import{K as E,Z as I,r as d,cb as P,S as r,P as i,M as t,T as n,V as _,U as f,a7 as m,X as l,W as a,L as c,b as S}from"./vendor-bSWkQivH.js";import{i as T,Q as L,a7 as k}from"./index-Dqv5IkpS.js";const N={class:"mb-10 max-w-md"},U={key:0},j={key:1},H={class:"mb-2 font-bold"},O={class:"mb-10 max-w-md"},Q={key:0},D={key:1},X=E({__name:"confirm-email",setup(K){const{t:h}=I();T({title:h("pages.confirm_email.meta.title")});const{confirmEmail:V,sendVerifyEmail:b,loading:$}=L(),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,M)=>{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",N,[s.value?(t(),c("span",U,a(e.$t("pages.confirm_email.link_sent_successfully_text")),1)):m("",!0),o.value?(t(),c("span",j,[f("div",H,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",O,[o.value?m("",!0):(t(),c("span",Q,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:S($),"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{X as default};
//# sourceMappingURL=confirm-email-Dg9vvM01.js.map
