import{M as E,$ as I,r as d,c8 as N,U as r,R as i,O as t,V as n,X as _,W as f,a8 as m,Z as l,Y as a,N as c,e as P}from"./vendor-CsGITfgk.js";import{f as S,a4 as T,ai as k}from"./index-GCDRvGOr.js";const L={class:"mb-10 max-w-md"},O={key:0},U={key:1},j={class:"mb-2 font-bold"},H={class:"mb-10 max-w-md"},R={key:0},D={key:1},Y=E({__name:"confirm-email",setup(M){const{t:h}=I();S({title:h("pages.confirm_email.meta.title")});const{confirmEmail:V,sendVerifyEmail:$,loading:b}=T(),p=k("UserId"),w=k("Token"),v=d(!1),o=d(!1),s=d();async function B(){s.value=await $(p.value),o.value=!1}return N(async()=>{const e=await V({userId:p.value,token:w.value});o.value=e.succeeded,s.value=void 0,v.value=!0}),(e,Q)=>{const g=r("VcTypography"),u=r("VcButton"),y=r("VcEmptyPage"),C=r("VcLoaderOverlay");return o.value||s.value?(t(),i(y,{key:0,image:"email.jpg",icon:"outline-e-mail","status-color":o.value?"success":"secondary"},{default:n(()=>[_(g,{tag:"h1",class:"order-first mb-6"},{default:n(()=>[l(a(e.$t("pages.confirm_email.header")),1)]),_:1}),f("div",L,[s.value?(t(),c("span",O,a(e.$t("pages.confirm_email.link_sent_successfully_text")),1)):m("",!0),o.value?(t(),c("span",U,[f("div",j,a(e.$t("pages.confirm_email.subtitle")),1),l(" "+a(e.$t("pages.confirm_email.text")),1)])):m("",!0)]),s.value?(t(),i(u,{key:0,to:{name:"Home"},"min-width":"12rem"},{default:n(()=>[l(a(e.$t("common.links.home")),1)]),_:1})):o.value?(t(),i(u,{key:1,to:{name:"SignIn"},"min-width":"12rem"},{default:n(()=>[l(a(e.$t("pages.confirm_email.continue_button")),1)]),_:1})):m("",!0)]),_:1},8,["status-color"])):v.value&&(!o.value||!s.value)?(t(),i(y,{key:1,image:"email.jpg",icon:"outline-e-mail","status-color":"danger"},{default:n(()=>[_(g,{tag:"h1",class:"order-first mb-6"},{default:n(()=>[l(a(e.$t("pages.confirm_email.header")),1)]),_:1}),f("div",H,[o.value?m("",!0):(t(),c("span",R,a(e.$t("pages.confirm_email.email_confirmation_failed_text")),1)),s.value===!1?(t(),c("span",D,a(e.$t("pages.confirm_email.link_sent_error_text")),1)):m("",!0)]),_(u,{loading:P(b),"min-width":"12rem",onClick:B},{default:n(()=>[l(a(e.$t("common.buttons.resend_link")),1)]),_:1},8,["loading"])]),_:1})):(t(),i(C,{key:2,"no-bg":""}))}}});export{Y as default};
//# sourceMappingURL=confirm-email-DORuDVE0.js.map
