import{F as E,ai as I,r as d,cc as P,P as m,_ as i,R as t,a1 as n,X as _,T as f,W as c,a2 as l,a0 as a,Q as r,e as T}from"./vendor-DtjVbdLs.js";import{f as N,a3 as S,aj as k}from"./index-D5bkQlXq.js";const j={class:"mb-10 max-w-md"},L={key:0},H={key:1},O={class:"mb-2 font-bold"},Q={class:"mb-10 max-w-md"},R={key:0},U={key:1},q=E({__name:"confirm-email",setup(D){const{t:h}=I();N({title:h("pages.confirm_email.meta.title")});const{confirmEmail:V,sendVerifyEmail:b,loading:$}=S(),p=k("UserId"),w=k("Token"),v=d(!1),o=d(!1),s=d();async function B(){s.value=await b(p.value),o.value=!1}return P(async()=>{const e=await V({userId:p.value,token:w.value});o.value=e.succeeded,s.value=void 0,v.value=!0}),(e,F)=>{const g=m("VcTypography"),u=m("VcButton"),y=m("VcEmptyPage"),C=m("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",j,[s.value?(t(),r("span",L,a(e.$t("pages.confirm_email.link_sent_successfully_text")),1)):c("",!0),o.value?(t(),r("span",H,[f("div",O,a(e.$t("pages.confirm_email.subtitle")),1),l(" "+a(e.$t("pages.confirm_email.text")),1)])):c("",!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})):c("",!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",Q,[o.value?c("",!0):(t(),r("span",R,a(e.$t("pages.confirm_email.email_confirmation_failed_text")),1)),s.value===!1?(t(),r("span",U,a(e.$t("pages.confirm_email.link_sent_error_text")),1)):c("",!0)]),_(u,{loading:T($),"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{q as default};
//# sourceMappingURL=confirm-email-FLzaPHPZ.js.map
