import C from"./CTMooejj.js";import{_ as x}from"./CW5dyef9.js";import{_ as b}from"./CotYPFFH.js";import{v as w,m as L,n as E,s as N,r as _,G as O,_ as V,o as l,c as u,a as s,t as o,b as f,C as W,w as S,d as c,H as B,p as D,q as T}from"./CibDhUcP.js";const j=w({__name:"ResendLink",props:{resendType:{type:String,default:"activateEmail"}},emits:["resend"],setup(t,{expose:i,emit:g}){i();const e=L(),d=E(),n=N(),a=t,p=g,r=_(!1),y=()=>{d.currentStep=0,n.clearData(),e.push("/signup")},R=O().public.WHM_EXTRAS,m=_(""),k=_(!1),h={router:e,store:d,sStore:n,props:a,emit:p,open:r,handleRestartSignup:y,isWhm:R,resendError:m,linkSent:k,resendLink:async()=>{const{error:v}=a.resendType==="resetPassword"?await n.triggerPasswordReset(n.signUpData.email):await n.resendVerificationEmail(n.signUpData.email);if(v){m.value=v;return}k.value=!0},toggleOpen:()=>{r.value=!r.value,r.value||(m.value="")}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),H={class:"bg-slate-100 p-4 rounded-lg text-sm leading-6"},M={class:"text-slate-900 font-medium"},P={class:"text-nowrap flex flex-col gap-2 py-4"},U={key:0},z={key:1},A={class:"flex items-center gap-1 text-slate-600"};function $(t,i,g,e,d,n){const a=C,p=x,r=b;return l(),u("div",H,[s("div",{class:"flex flex-row justify-between cursor-pointer",onClick:e.toggleOpen},[s("span",M,o(e.isWhm?t.$t("CodeNotReceived"):t.$t("LinkNotReceived")),1),f(a,{class:W(["size-5 text-gray-500",{"transform rotate-90":e.open}]),name:"tabler:chevron-right"},null,8,["class"])]),f(r,{open:e.open},{default:S(()=>[i[0]||(i[0]=s("hr",{class:"border-slate-300 mt-2"},null,-1)),s("div",P,[s("div",null,[e.linkSent?(l(),u("p",z,[s("span",A,[c(o(e.isWhm?t.$t("CodeSent"):t.$t("LinkSent"))+" ",1),f(a,{name:"material-symbols:check-circle",class:"w-5 h-5 text-green-600"})])])):(l(),u("p",U,[c(o(t.$t("CheckSpam")+" "+t.$t("or"))+" ",1),s("a",{class:"text-primary cursor-pointer",onClick:B(e.resendLink,["stop"])},o(e.isWhm?t.$t("ResendCode"):t.$t("ResendLink")),1)])),!e.linkSent&&e.resendError?(l(),D(p,{key:2,class:"mt-4"},{default:S(()=>[c(o(e.resendError),1)]),_:1})):T("",!0)]),s("div",null,[c(o(t.$t("RestartEmail"))+" ",1),s("span",{class:"text-primary hover:cursor-pointer",onClick:e.handleRestartSignup},o(t.$t("SignUp")),1)])])]),_:1},8,["open"])])}const K=Object.assign(V(j,[["render",$],["__file","ResendLink.vue"]]),{__name:"ResendLink"});export{K as default};
