import{C as E,V as I,r as d,cm as N,N as r,K as i,E as t,O as n,Q as _,P as f,a3 as m,S as l,R as a,D as c,u as P}from"./vendor-BGtMsOoo.js";import{i as S,Q as T,a7 as k}from"./index-CRze-aDK.js";const L={class:"mb-10 max-w-md"},O={key:0},Q={key:1},j={class:"mb-2 font-bold"},D={class:"mb-10 max-w-md"},H={key:0},R={key:1},z=E({__name:"confirm-email",setup(U){const{t:h}=I();S({title:h("pages.confirm_email.meta.title")});const{confirmEmail:V,sendVerifyEmail:b,loading:$}=T(),p=k("UserId"),w=k("Token"),v=d(!1),o=d(!1),s=d();async function C(){s.value=await b(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,K)=>{const g=r("VcTypography"),u=r("VcButton"),y=r("VcEmptyPage"),B=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",Q,[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",D,[o.value?m("",!0):(t(),c("span",H,a(e.$t("pages.confirm_email.email_confirmation_failed_text")),1)),s.value===!1?(t(),c("span",R,a(e.$t("pages.confirm_email.link_sent_error_text")),1)):m("",!0)]),_(u,{loading:P($),"min-width":"12rem",onClick:C},{default:n(()=>[l(a(e.$t("common.buttons.resend_link")),1)]),_:1},8,["loading"])]),_:1})):(t(),i(B,{key:2,"no-bg":""}))}}});export{z as default};
//# sourceMappingURL=confirm-email-CqdgdHKV.js.map
