import{_ as b,a as v}from"./hLi6Tdy_.js";import{_ as x}from"./Du23p2ZK.js";import y from"./DgZ9OEJo.js";import{_ as V}from"./dbr-bJEC.js";import{e as h}from"./lRkhHGoP.js";import{v as E,s as U,n as k,H as C,_ as P,o as S,c as w,L as D,aw as F,a as I,b as s,w as i,d as m,t as l,q as g,p as B,I as N}from"./CChoqk00.js";import{u as O}from"./MVVtZ0CP.js";import{u as T}from"./DTzhji9-.js";import"./D7TmchvX.js";import"./4Fu3KWqy.js";import"./BBOawLyY.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(I("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(),B(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};
