// 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 (
setHov(true)} onMouseLeave={()=>setHov(false)}>
{plan.featured && (
MOST POPULAR
)}
{plan.name}

{plan.desc}

{price ? ( <> $ {price} {plan.unit} ) : ( Custom Quote )}
{plan.features.map((f,j) => (
{f}
))}
{ e.currentTarget.style.background=plan.featured?T.coralL:T.n800; e.currentTarget.style.color='#fff'; e.currentTarget.style.borderColor=T.n800; e.currentTarget.style.transform='translateY(-2px)'; if(plan.featured) e.currentTarget.style.boxShadow=`0 8px 24px rgba(232,113,74,0.38)`; }} onMouseLeave={e=>{ e.currentTarget.style.background=plan.featured?T.coral:'transparent'; e.currentTarget.style.color=plan.featured?'#fff':T.g700; e.currentTarget.style.borderColor=plan.featured?'none':T.g200; e.currentTarget.style.transform='translateY(0)'; e.currentTarget.style.boxShadow='none'; }}> {plan.cta}
); } function PNSPricing() { const [annual, setAnnual] = useState(false); return (
); } window.PNSPricing = PNSPricing; /* ── CONTACT ──────────────────────────────────────────────────────── */ // Email delivery: wp_mail() via WordPress REST API — no EmailJS needed // ─── reCAPTCHA v3 ──────────────────────────────────────────────────── // To activate: replace with your site key from console.cloud.google.com, // then add