import{u as o,r as i,j as e}from"./vendor-CIGJ9g2q.js";import{u as c,L as x}from"./index-C-2a0Dur.js";function m(){const n=o(),{isLoading:t,isAuthenticated:r,login:s,error:a}=c(),l=i.useRef(0);return i.useEffect(()=>{!r&&!t&&l.current===0&&(s(),l.current+=1),r&&n("/buy")},[r,t,s,n]),e.jsx("main",{className:"flex min-h-[calc(100vh-8rem)] flex-col items-center justify-center p-4 font-vazir",children:t?e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx(x,{className:"h-12 w-12 animate-spin text-primary"}),e.jsx("p",{className:"text-lg font-medium",children:"در حال تأیید حساب کاربری شما..."})]}):a?e.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[e.jsx("div",{className:"rounded-full bg-red-100 p-3",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8 text-red-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),e.jsx("h2",{className:"text-xl text-neutral-900 dark:text-neutral-50 font-bold",children:"تأیید ناموفق"}),e.jsx("p",{className:"text-muted-foreground",children:a||"کاربر تأیید نشده است. لطفاً بعداً دوباره تلاش کنید."}),e.jsx("button",{onClick:()=>s(),className:"mt-4 rounded-md cursor-pointer bg-neutral-500 px-4 py-2 text-white hover:bg-neutral-700/90",children:"تلاش مجدد"})]}):null})}export{m as default};
