import"../chunks/Bzak7iHL.js";import{p as Q,f as d,a as r,b as U,c as l,r as n,e as m,n as h,t as A,d as E,s as S,j as O,g as V,i as T}from"../chunks/CnGaPG_y.js";import{s as R}from"../chunks/BBilxCvN.js";import{i as f}from"../chunks/BqhvobEz.js";import{a as W,e as X}from"../chunks/wQM2jOhz.js";import{S as Z}from"../chunks/DmCpX-F9.js";import{g as I}from"../chunks/BSWJzOrc.js";var $=d('
'),ee=d(''),te=d('
Your email has been verified successfully.
',1),re=d('Your email address has already been verified.
',1),ae=d('The verification token has expired. Please enter your email to resend the verification email.
',1),se=d('Please enter your email to resend the verification email.
',1),oe=d('',1),ie=d('');function xe(z,o){Q(o,!0);const x=i=>{var t=ee(),c=l(t);{var g=e=>{var s=$(),a=l(s,!0);n(s),A(()=>R(a,O(k))),r(e,s)};f(c,e=>{O(k)&&e(g)})}var p=S(c,4),v=l(p);{var L=e=>{Z(e)};f(v,e=>{O(G)&&e(L)})}h(),n(p),n(t),W(t,(e,s)=>{var a;return(a=X)==null?void 0:a(e,s)},()=>()=>(T(G,!0),({result:e})=>{var s;e.status===200?(T(k,""),B.add("Success","Please check your email","success")):e.type==="failure"&&T(k,(s=e==null?void 0:e.data)!=null&&s.error?e.data.error:"An error occurred",!0),T(G,!1)})),r(i,t)};let k=V(void 0),G=V(!1);const B=I();var H=ie(),C=l(H);{var D=i=>{var t=te(),c=m(t),g=l(c,!0);n(c),h(4),A(()=>R(g,o.data.message)),r(i,t)},F=i=>{var t=E(),c=m(t);{var g=p=>{var v=E(),L=m(v);{var e=a=>{var P=re();h(4),r(a,P)},s=a=>{var P=E(),J=m(P);{var K=b=>{var y=ae(),j=S(m(y),4),Y=l(j);x==null||x(Y),h(2),n(j),r(b,y)},M=b=>{var y=E(),j=m(y);{var Y=u=>{var _=se(),w=S(m(_),4),q=l(w);x==null||x(q),h(2),n(w),r(u,_)},N=u=>{var _=oe(),w=S(m(_),2),q=l(w,!0);n(w),h(2),A(()=>R(q,o.data.error)),r(u,_)};f(j,u=>{o.data.error==="Token is required"?u(Y):u(N,!1)},!0)}r(b,y)};f(J,b=>{o.data.error==="Token expired"?b(K):b(M,!1)},!0)}r(a,P)};f(L,a=>{o.data.error==="Email already verified"?a(e):a(s,!1)})}r(p,v)};f(c,p=>{var v;(v=o.data)!=null&&v.error&&p(g)},!0)}r(i,t)};f(C,i=>{var t;((t=o.data)==null?void 0:t.status)===200?i(D):i(F,!1)})}n(H),r(z,H),U()}export{xe as component};