import{_ as b,a as v}from"./B50g7Dgj.js";import{_ as x}from"./CW5dyef9.js";import y from"./CTMooejj.js";import{_ as V}from"./BpJC44XK.js";import{e as h}from"./B5iENo_P.js";import{v as E,s as U,n as k,G as C,_ as P,o as S,c as w,L as D,av as F,a as B,b as s,w as i,d as m,t as l,q as g,p as I,H as N}from"./CibDhUcP.js";import{u as O}from"./CIF28Dcq.js";import{u as T}from"./fWHo1AcK.js";import"./CBXHUQO1.js";import"./5LXQy1qV.js";import"./BCJxuefG.js";const H=E({__name:"SignupFormStep2",setup(r,{expose:t}){t();const u=U(),e=k(),{passwordError:d,isPasswordValid:_}=O(),c=async()=>{if(!_())return;const{error:p}=await u.setPassword();if(p){d.value=p;return}e.currentStep=3},f=C().public.WHM_EXTRAS,{tracker:n}=T();n("page_view","page","signup process step 2");const a={sStore:u,store:e,passwordError:d,isPasswordValid:_,handleSetPassword:c,isWhm:f,tracker:n,get VOtpInput(){return h}};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}}),M={key:0,class:"mb-4"};function W(r,t,u,e,d,_){const c=b,f=v,n=x,a=y,p=V;return S(),w("form",{onSubmit:N(e.handleSetPassword,["prevent"])},[D(B("input",{id:"email","onUpdate:modelValue":t[0]||(t[0]=o=>e.sStore.signUpData.email=o),type:"email",class:"hidden"},null,512),[[F,e.sStore.signUpData.email]]),s(c,{id:"new-password",modelValue:e.sStore.signUpData.password,"onUpdate:modelValue":t[1]||(t[1]=o=>e.sStore.signUpData.password=o),class:"mb-4",type:"password",autocomplete:"new-password"},{default:i(()=>[m(l(r.$t("Password")),1)]),_:1},8,["modelValue"]),e.isWhm?(S(),w("div",M,[s(f,null,{default:i(()=>[m(l(r.$t("EnterOTPCode")),1)]),_:1}),s(e.VOtpInput,{ref:"otpInput",value:e.sStore.otpCode,"onUpdate:value":t[2]||(t[2]=o=>e.sStore.otpCode=o),"input-classes":"otp-input","conditional-class":["one","two","three","four"],separator:"","input-type":"number","num-inputs":6,"should-auto-focus":!0,"should-focus-order":!0,placeholder:[],class:"flex gap-4"},null,8,["value"])])):g("",!0),e.passwordError?(S(),I(n,{key:1},{default:i(()=>[m(l(e.passwordError),1)]),_:1})):g("",!0),s(p,{size:"small",class:"px-8 py-2",type:"submit",tag:"button"},{default:i(()=>[m(l(r.$t("Next"))+" ",1),s(a,{name:"tabler:chevron-right",class:"size-4"})]),_:1})],32)}const Y=Object.assign(P(H,[["render",W],["__file","SignupFormStep2.vue"]]),{__name:"SignupFormStep2"});export{Y as default};
