1import{r as p,j as e,b as h,u as g,L as d}from"./index-VIzOfxbY.js";import{i as f,g as b,a as y,u as j}from"./use-subscription-kRqZgYXP.js";import{c as N}from"./createLucideIcon-CRwf-JnQ.js";import{C as w}from"./check-BTFCVWAT.js";const v=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],k=N("arrow-left",v);function E(){const[t,a]=p.useState(!1);return{openCheckout:async s=>{a(!0);try{await f();const r=await b(s.priceId);window.Paddle.Checkout.open({items:[{priceId:r,quantity:1}],customer:s.customerEmail?{email:s.customerEmail}:void 0,customData:s.customData,settings:{displayMode:"overlay",successUrl:s.successUrl??`${window.location.origin}/create?checkout=success`,allowLogout:!1,variant:"one-page"}})}finally{a(!1)}},loading:t}}function C(){return y()!=="sandbox"?null:e.jsxs("div",{className:"w-full bg-orange-100 border-b border-orange-300 px-4 py-2 text-center text-xs text-orange-800",children:["Test mode â payments here use Paddle's sandbox and won't charge real cards."," ",e.jsx("a",{href:"https://docs.lovable.dev/features/payments#test-and-live-environments",target:"_blank",rel:"noopener noreferrer",className:"underline font-medium",children:"Learn more"})]})}const A="/assets/quetis-logo-BJHedRKE.png";function R(){const{user:t}=h(),{hasAccess:a,loading:n}=j(),{openCheckout:s,loading:r}=E(),o=g(),i=async l=>{if(!t){o({to:"/login",search:{redirect:"/pricing"}});return}await s({priceId:l,customerEmail:t.email,customData:{userId:t.id},successUrl:`${window.location.origin}/create?checkout=success`})};return e.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[e.jsx(C,{}),e.jsx("header",{className:"border-b border-border",children:e.jsxs("div",{className:"mx-auto flex max-w-6xl items-center justify-between px-4 py-4",children:[e.jsx(d,{to:"/",className:"flex items-center gap-2",children:e.jsx("img",{src:A,alt:"Quetis",className:"h-8 w-auto"})}),e.jsxs(d,{to:"/",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground",children:[e.jsx(k,{className:"h-4 w-4"})," Back"]})]})}),e.jsxs("main",{className:"mx-auto max-w-6xl px-4 py-16",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"text-4xl font-bold tracking-tight",children:"Pricing"}),e.jsx("p",{className:"mt-3 text-muted-foreground",children:"Start small, scale to your whole business. Cancel anytime."})]}),a&&!n&&e.jsxs("div",{className:"mx-auto mt-8 max-w-md rounded-lg border border-green-300 bg-green-50 px-4 py-3 text-center text-sm text-green-800",children:["You already have access."," ",e.jsx(d,{to:"/create",className:"underline font-medium",children:"Open the app"})]}),e.jsxs("div",{className:"mt-12 grid gap-6 md:grid-cols-2 lg:grid-cols-4",children:[e.jsx(c,{name:"Free",price:"$0",cadence:"",description:"Try Quetis with 3 framed photos per month.",features:P,cta:t?"You're on Free":"Get started",onClick:()=>{o(t?{to:"/create"}:{to:"/login",search:{redirect:"/create"}})},loading:!1}),e.jsx(c,{name:"Monthly",price:"$10",cadence:"/month",description:"Flexible month-to-month billing.",features:x,cta:"Get Monthly",onClick:()=>i("quetis_pro_monthly"),loading:r}),e.jsx(c,{name:"Yearly",price:"$100",cadence:"/year",description:"Save $20 â equivalent to 2 months free.",features:x,cta:"Get Yearly",highlight:!0,onClick:()=>i("quetis_pro_yearly"),loading:r}),e.jsx(c,{name:"Enterprise",price:"Custom",cadence:"",description:"For teams and businesses that need more.",features:S,cta:"Contact Sales",onClick:()=>{window.location.href="mailto:[email protected]?subject=Quetis%20Enterprise%20Inquiry&body=Hi%20Quetis%20team%2C%0A%0AI%27d%20like%20to%20learn%20more%20about%20your%20Enterprise%20plan.%0A%0ACompany%3A%20%0ATeam%20size%3A%20%0AUse%20case%3A%20"},loading:!1})]}),e.jsx("p",{className:"mt-10 text-center text-xs text-muted-foreground",children:"Secure checkout via Paddle. Taxes calculated at checkout."})]})]})}const P=["3 framed photos per month","All themed frames","High-resolution exports"],x=["100 framed photos per month","Video mode","All themed frames","Custom branded frames","High-resolution exports","Email support"],S=["Unlimited framed photos","Video mode","Team seats / multi-user accounts","Custom branding & white-label","Priority support","All Pro features included"];function c({name:t,price:a,cadence:n,description:s,features:r,cta:o,highlight:i,onClick:l,loading:m}){return e.jsxs("div",{className:`rounded-2xl border p-8 ${i?"border-primary bg-primary/5 shadow-lg":"border-border bg-card"}`,children:[e.jsxs("div",{className:"flex items-baseline justify-between",children:[e.jsx("h2",{className:"text-xl font-semibold",children:t}),i&&e.jsx("span",{className:"rounded-full bg-primary px-2 py-0.5 text-xs font-medium text-primary-foreground",children:"Best value"})]}),e.jsxs("div",{className:"mt-4 flex items-baseline gap-1",children:[e.jsx("span",{className:"text-4xl font-bold",children:a}),n&&e.jsx("span",{className:"text-muted-foreground",children:n})]}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:s}),e.jsx("button",{onClick:l,disabled:m,className:"mt-6 w-full rounded-md bg-primary px-4 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:opacity-50",children:m?"Opening checkoutâ¦":o}),e.jsx("ul",{className:"mt-6 space-y-2",children:r.map(u=>e.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[e.jsx(w,{className:"mt-0.5 h-4 w-4 shrink-0 text-primary"}),e.jsx("span",{children:u})]},u))})]})}export{R 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.