// pns-4.jsx — Pricing · Contact · Footer const { useState, useRef } = React; const wpS = window.pnsWP?.settings || {}; const T = window.PNST; const { EyebrowBadge, SectionTitle, ImgPlaceholder } = window; /* ── PRICING ─────────────────────────────────────────────────────── */ const PLANS_DEFAULT = [ { name:'Essential', featured:false, monthlyPrice:99, annualPrice:79, unit:'per device/mo', desc:'Perfect for small businesses needing reliable IT foundations.', features:['24/7 System Monitoring','Helpdesk Support (Business Hours)','Patch Management','Antivirus & EDR Protection','Monthly Reporting'], cta:'Get Started', ctaLink:'#contact', }, { name:'Professional', featured:true, monthlyPrice:149, annualPrice:119, unit:'per device/mo', desc:'Our most popular plan for growing businesses.', features:['Everything in Essential','24/7 Helpdesk Support','Advanced Cybersecurity Suite','Microsoft 365 Management','Network Monitoring & Management','Quarterly Business Reviews'], cta:'Get Started', ctaLink:'#contact', }, { name:'Enterprise', featured:false, monthlyPrice:null, annualPrice:null, unit:'Custom pricing', desc:'Tailored solutions for complex or multi-location businesses.', features:['Everything in Professional','Dedicated Account Manager','On-Site Support Included','AI Automation Consulting','Custom SLA & Response Times','Priority 1-Hour Response'], cta:'Contact Us', ctaLink:'#contact', }, ]; const P4_SITE = (window.pnsWP && window.pnsWP.siteUrl) || ''; const p4Url = (slug, file) => P4_SITE ? P4_SITE + slug + '/' : file; const P4_CONTACT = p4Url('contact','Contact.html'); // Posts to the theme's REST endpoints (wp_mail server-side). Outside // WordPress there is no endpoint, so the helper reports that honestly // instead of showing a success screen that sent nothing. async function pnsPost(route, body) { const base = window.pnsWP && window.pnsWP.restUrl; if (!base) return { ok:false, offline:true, message:'Preview mode — this form sends once the site is live on WordPress.' }; try { const res = await fetch(base + route, { method:'POST', headers:{ 'Content-Type':'application/json', ...(window.pnsWP.nonce ? { 'X-WP-Nonce': window.pnsWP.nonce } : {}) }, body: JSON.stringify(body), }); let data = {}; try { data = await res.json(); } catch (e) {} if (res.ok && data.ok !== false) return { ok:true }; return { ok:false, message: data.message || 'Something went wrong. Please try again, or call us directly.' }; } catch (err) { console.warn('[PNS] send failed:', err); return { ok:false, message:'Network error. Please try again, or email us directly.' }; } } // Plan CTAs must go to the Contact page. A bare "#contact" anchor only resolves // on the homepage, so it silently did nothing on /pricing/. const _rawPlans = (window.pnsWP?.plans?.length>0) ? window.pnsWP.plans : PLANS_DEFAULT; const PLANS = _rawPlans.map(p => ({ ...p, ctaLink: (!p.ctaLink || p.ctaLink === '#contact' || p.ctaLink === '#') ? P4_CONTACT : p.ctaLink, })); function CheckMark({ featured }) { const c = featured ? T.teal : T.coral; return ( ); } /* ── PRICING CARD (stacked animation) ───────────────────────────── */ function PricingCard({ plan, annual }) { const [hov, setHov] = useState(false); const price = annual ? plan.annualPrice : plan.monthlyPrice; const layer1 = plan.featured ? T.coral : T.teal; const layer2 = plan.featured ? T.tealL : T.blue; return (
{plan.desc}
{wpS.pricingBody||'Transparent pricing with no hidden fees. All plans include our core monitoring and helpdesk services.'}
{/* Toggle */}{wpS.pricingDisclaimer||'All plans billed per managed device. Contact us for volume discounts. No long-term contracts required.'}