var k=(x,r,i)=>new Promise((t,c)=>{var p=s=>{try{u(i.next(s))}catch(m){c(m)}},d=s=>{try{u(i.throw(s))}catch(m){c(m)}},u=s=>s.done?t(s.value):Promise.resolve(s.value).then(p,d);u((i=i.apply(x,r)).next())});import{u as I,a as S,L as z,_ as R,b as P}from"./LoginFormTitle.8be4bfe0.js";import{a as B,I as g,c as L,r as w,m as U,f as E,k as e,o as N,h as V,j as a,p as n,q as y,t as v,B as b,F as T,aL as D}from"./index.bde7963b.js";import{F as C}from"./index.0103b3aa.js";import"./index.3289c967.js";import{S as j,a as q}from"./index.dcd3d2b7.js";import{C as G}from"./index.ce7c5e55.js";import"./_baseIteratee.34b68bfe.js";const W=B({__name:"RegisterForm",setup(x){const r=C.Item,i=g.Password,{t}=L(),{handleBackLogin:c,getLoginState:p}=I(),d=w(),u=w(!1),s=U({account:"",password:"",confirmPassword:"",mobile:"",sms:"",policy:!1}),{getFormRules:m}=S(s),{validForm:F}=P(d),_=E(()=>e(p)===z.REGISTER);function h(){return k(this,null,function*(){const f=yield F();!f||console.log(f)})}return(f,o)=>e(_)?(N(),V(T,{key:0},[a(R,{class:"enter-x"}),a(e(C),{class:"p-4 enter-x",model:s,rules:e(m),ref_key:"formRef",ref:d},{default:n(()=>[a(e(r),{name:"account",class:"enter-x"},{default:n(()=>[a(e(g),{class:"fix-auto-fill",size:"large",value:s.account,"onUpdate:value":o[0]||(o[0]=l=>s.account=l),placeholder:e(t)("sys.login.userName")},null,8,["value","placeholder"])]),_:1}),a(e(r),{name:"mobile",class:"enter-x"},{default:n(()=>[a(e(g),{size:"large",value:s.mobile,"onUpdate:value":o[1]||(o[1]=l=>s.mobile=l),placeholder:e(t)("sys.login.mobile"),class:"fix-auto-fill"},null,8,["value","placeholder"])]),_:1}),a(e(r),{name:"sms",class:"enter-x"},{default:n(()=>[a(e(G),{size:"large",class:"fix-auto-fill",value:s.sms,"onUpdate:value":o[2]||(o[2]=l=>s.sms=l),placeholder:e(t)("sys.login.smsCode")},null,8,["value","placeholder"])]),_:1}),a(e(r),{name:"password",class:"enter-x"},{default:n(()=>[a(e(j),{size:"large",value:s.password,"onUpdate:value":o[3]||(o[3]=l=>s.password=l),placeholder:e(t)("sys.login.password")},null,8,["value","placeholder"])]),_:1}),a(e(r),{name:"confirmPassword",class:"enter-x"},{default:n(()=>[a(e(i),{size:"large",visibilityToggle:"",value:s.confirmPassword,"onUpdate:value":o[4]||(o[4]=l=>s.confirmPassword=l),placeholder:e(t)("sys.login.confirmPassword")},null,8,["value","placeholder"])]),_:1}),a(e(r),{class:"enter-x",name:"policy"},{default:n(()=>[a(e(q),{checked:s.policy,"onUpdate:checked":o[5]||(o[5]=l=>s.policy=l),size:"small"},{default:n(()=>[y(v(e(t)("sys.login.policy")),1)]),_:1},8,["checked"])]),_:1}),a(e(b),{type:"primary",class:"enter-x",size:"large",block:"",onClick:h,loading:u.value},{default:n(()=>[y(v(e(t)("sys.login.registerButton")),1)]),_:1},8,["loading"]),a(e(b),{size:"large",block:"",class:"mt-4 enter-x",onClick:e(c)},{default:n(()=>[y(v(e(t)("sys.login.backSignIn")),1)]),_:1},8,["onClick"])]),_:1},8,["model","rules"])],64)):D("",!0)}});export{W as default};
