1import{K as e,Z as t,f as n,n as r,s as i,t as a}from"./jsx-runtime-DQzIIyUr.js";import{i as o}from"./lib-BdUqZw-t.js";import{s}from"./dist-c-yxsSci.js";import{d as c,h as l,t as u,y as d}from"./seo-Bcm6Z8zA.js";import{l as f}from"./serverCalls-DUwxBaCV.js";import{t as p}from"./useAccessLevel-Dzn6pCv6.js";var m=t(e(),1),h=a(),g=()=>u({title:`Purchase Complete`,description:`Your brandmint.ai purchase was successful.`,path:`/success`,noIndex:!0}),_=i(()=>{let[e]=o(),t=e.get(`session_id`),[i,a]=(0,m.useState)(null),[u,g]=(0,m.useState)(``),_=n(),{getToken:v}=s(),{refreshAccessLevel:y}=p();return(0,m.useEffect)(()=>{(async()=>{let e=await v();if(t&&e){let n=await f(t,e);a(n.status),g(n.customer_email||``),n.status===`complete`&&await y()}})()},[t,y]),i===`open`?(0,h.jsx)(r,{to:`/checkout`}):i===`complete`?(0,h.jsx)(`div`,{className:`flex flex-col w-full max-w-2xl mx-auto min-h-[100dvh] space-y-6 px-4 py-8`,children:(0,h.jsxs)(`section`,{id:`success`,className:`flex flex-col gap-8`,children:[(0,h.jsx)(`div`,{className:`flex justify-center w-full`,children:(0,h.jsxs)(`h2`,{children:[`Your `,c,` is now live!`]})}),(0,h.jsxs)(`p`,{className:`bg-white/80 p-4 rounded-2xl text-gray-600`,children:[`Thank you for supporting `,d,`. A confirmation email will be sent to `,u,`.`,(0,h.jsx)(`br`,{}),(0,h.jsx)(`br`,{}),`If you have any questions, please email`,` `,(0,h.jsx)(`a`,{className:`underline text-blue-500`,href:`mailto:${l}`,children:l})]}),(0,h.jsx)(`div`,{className:`flex justify-center w-full`,children:(0,h.jsx)(`button`,{className:`pill-button primary-action-button extra-big`,onClick:()=>_(`/`),children:`Start Minting`})})]})}):(0,h.jsx)(`div`,{className:`flex flex-col w-full max-w-2xl mx-auto min-h-[100dvh] space-y-6 px-4 py-8 items-center justify-center`,children:(0,h.jsx)(`span`,{className:`loading loading-spinner loading-xl`})})});export{_ as default,g as meta};
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.