import{F as E,ag as I,r as d,ca as P,P as r,_ as i,R as t,a1 as n,X as _,T as f,W as m,a2 as l,a0 as a,Q as c,e as T}from"./vendor-3e8OGtgt.js";import{f as N,a3 as S,ai as k}from"./index-Db0iSsz5.js";const L={class:"mb-10 max-w-md"},j={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=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",j,a(e.$t("pages.confirm_email.link_sent_successfully_text")),1)):m("",!0),o.value?(t(),c("span",H,[f("div",O,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",Q,[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",U,a(e.$t("pages.confirm_email.link_sent_error_text")),1)):m("",!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-CtZ-qghA.js.map
