1import{c as u,a as h,R as y,r as g,j as e,L as n,S as f,t as l,s as b}from"./main-uPQenPng.js";import{u as j,a as N}from"./useSubscription-DkEBq48-.js";import{F as k}from"./file-spreadsheet-9N5i4qe-.js";const w=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],c=u("check",w),v=["3 budget categories","Manual subscription entry (up to 3)","Payday Planner with 3 categories","Impulse Check on shopping sites","All data stays on your device"],C=["Unlimited budget categories","Automatic subscription detection","Unlimited tracked subscriptions","Renewal notifications (3 days early)","3-month budget history","CSV export","Cross-device sync"];function P(){const{user:s}=h(),d=y.useNavigate(),{openCheckout:i,loading:a}=j(),{isActive:m}=N(),[r,o]=g.useState("monthly"),p=async()=>{if(!s){l.info("Create an account first to subscribe"),d({to:"/signup",search:{next:"/pricing"}});return}try{await i({priceId:r==="monthly"?"plus_monthly":"plus_yearly",customerEmail:s.email??void 0,customData:{userId:s.id},successUrl:`${window.location.origin}/account?checkout=success&onboarding=plus`})}catch(t){console.error(t),l.error("Couldn't open checkout. Please try again.")}},x=async()=>{try{await b.from("analytics_events").insert({event_name:"etsy_button_click",properties:{location:"pricing_page",button_label:"Browse the planning kits",destination:"https://www.etsy.com/shop/TheScatteredSaver"},page_path:typeof window<"u"?window.location.pathname:null,referrer:typeof document<"u"&&document.referrer||null,user_agent:typeof navigator<"u"?navigator.userAgent:null})}catch(t){console.error("Analytics: failed to log etsy_button_click",t)}};return e.jsx("div",{className:"px-5 py-16 md:py-24",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("h1",{className:"text-4xl md:text-6xl font-black text-center",children:"Simple, kind pricing"}),e.jsx("p",{className:"text-center text-lg text-muted-foreground mt-4",children:"Start free. Upgrade only if you want more."}),e.jsx("div",{className:"mt-8 flex justify-center",children:e.jsxs("div",{className:"inline-flex items-center bg-card border border-border rounded-full p-1 shadow-soft",children:[e.jsx("button",{type:"button",onClick:()=>o("monthly"),className:`px-5 py-2 text-sm font-bold rounded-full transition ${r==="monthly"?"bg-primary text-primary-foreground shadow-pop":"text-muted-foreground hover:text-foreground"}`,children:"Monthly"}),e.jsxs("button",{type:"button",onClick:()=>o("yearly"),className:`px-5 py-2 text-sm font-bold rounded-full transition flex items-center gap-2 ${r==="yearly"?"bg-primary text-primary-foreground shadow-pop":"text-muted-foreground hover:text-foreground"}`,children:["Yearly",e.jsx("span",{className:`text-[10px] px-2 py-0.5 rounded-full ${r==="yearly"?"bg-primary-foreground/20":"bg-secondary/30 text-secondary-foreground"}`,children:"Save 32%"})]})]})}),e.jsxs("div",{className:"mt-14 grid md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"p-8 rounded-3xl bg-card border border-border shadow-soft",children:[e.jsx("p",{className:"font-bold text-muted-foreground uppercase text-xs tracking-wider",children:"Free"}),e.jsx("p",{className:"mt-3 text-5xl font-black",children:"$0"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Forever. No card required."}),e.jsx("ul",{className:"mt-7 space-y-3",children:v.map(t=>e.jsxs("li",{className:"flex gap-3",children:[e.jsx(c,{className:"w-5 h-5 text-primary shrink-0 mt-0.5"}),e.jsx("span",{children:t})]},t))}),e.jsx(n,{to:"/download",className:"mt-8 block text-center px-5 py-3 rounded-2xl bg-card border border-border font-bold hover:border-primary/50 transition",children:"Get the free version"})]}),e.jsxs("div",{className:"p-8 rounded-3xl bg-gradient-to-br from-primary/10 via-card to-secondary/10 border-2 border-primary shadow-pop relative",children:[e.jsxs("span",{className:"absolute -top-3 left-8 px-3 py-1 rounded-full bg-primary text-primary-foreground text-xs font-extrabold flex items-center gap-1",children:[e.jsx(f,{className:"w-3 h-3"})," Best for everyday"]}),e.jsx("p",{className:"font-bold text-primary uppercase text-xs tracking-wider",children:"Plus"}),r==="monthly"?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"mt-3 text-5xl font-black",children:["$5.99",e.jsx("span",{className:"text-lg font-bold text-muted-foreground",children:"/mo"})]}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Billed monthly · cancel anytime"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"mt-3 text-5xl font-black",children:["$49",e.jsx("span",{className:"text-lg font-bold text-muted-foreground",children:"/yr"})]}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Just $4.08/mo · billed yearly"})]}),e.jsx("ul",{className:"mt-7 space-y-3",children:C.map(t=>e.jsxs("li",{className:"flex gap-3",children:[e.jsx(c,{className:"w-5 h-5 text-primary shrink-0 mt-0.5"}),e.jsx("span",{children:t})]},t))}),m?e.jsx(n,{to:"/account",className:"mt-8 block text-center px-5 py-3 rounded-2xl bg-primary/90 text-primary-foreground font-extrabold shadow-pop hover:scale-[1.02] transition",children:"You're on Plus â Manage"}):e.jsx("button",{type:"button",onClick:p,disabled:a,className:"mt-8 w-full text-center px-5 py-3 rounded-2xl bg-primary text-primary-foreground font-extrabold shadow-pop hover:scale-[1.02] transition disabled:opacity-60 disabled:cursor-not-allowed",children:a?"Opening checkoutâ¦":s?`Upgrade to Plus â ${r==="monthly"?"$5.99/mo":"$49/yr"}`:"Create account & upgrade"})]})]}),e.jsx("p",{className:"text-center text-sm text-muted-foreground mt-10",children:"Secure checkout · Cancel anytime · 30-day money-back guarantee"}),e.jsx("section",{className:"mt-16 p-8 md:p-10 rounded-3xl bg-gradient-to-br from-secondary/15 via-card to-primary/10 border border-border shadow-soft",children:e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-6 md:gap-10",children:[e.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-2xl bg-primary/10 shrink-0",children:e.jsx(k,{className:"w-8 h-8 text-primary"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"font-bold text-primary uppercase text-xs tracking-wider",children:"Bonus"}),e.jsx("h2",{className:"mt-2 text-2xl md:text-3xl font-black",children:"Go deeper â planning kits on Etsy"}),e.jsx("p",{className:"mt-3 text-muted-foreground",children:"Excel and Google Sheets templates that pair with the extension: budget kits, debt payoff tracker, freelancer tools, and more. Instant download after purchase."})]}),e.jsx("a",{href:"https://www.etsy.com/shop/TheScatteredSaver",target:"_blank",rel:"noopener noreferrer",onClick:()=>{x()},className:"inline-flex items-center justify-center px-6 py-3 rounded-2xl bg-primary text-primary-foreground font-extrabold shadow-pop hover:scale-[1.02] transition shrink-0",children:"Browse the planning kits â
1"})]})})]})})}export{P as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.