var k=(x,n,i)=>new Promise((t,c)=>{var p=s=>{try{m(i.next(s))}catch(u){c(u)}},d=s=>{try{m(i.throw(s))}catch(u){c(u)}},m=s=>s.done?t(s.value):Promise.resolve(s.value).then(p,d);m((i=i.apply(x,n)).next())});import{u as h,a as I,L as z,_ as R,b as P}from"./LoginFormTitle.620e6f7b.js";import{a as B,I as g,c as U,r as w,m as L,f as E,k as e,o as N,h as V,j as a,p as r,q as y,t as v,B as b,F as T,aS as D}from"./index.0d073eaa.js";/* empty css              *//* empty css              */import{C as j}from"./index.1491cab6.js";import{S as q}from"./index.31930d74.js";import{C as G}from"./index.e8daa066.js";import{F as C}from"./Form.48352728.js";import"./Checkbox.476f6e92.js";import"./Col.a2eadc78.js";import"./useFlexGapSupport.474c31b7.js";import"./_baseIteratee.3919e7cf.js";import"./get.49a42f2e.js";import"./useSize.bb4e5ce5.js";const oe=B({__name:"RegisterForm",setup(x){const n=C.Item,i=g.Password,{t}=U(),{handleBackLogin:c,getLoginState:p}=h(),d=w(),m=w(!1),s=L({account:"",password:"",confirmPassword:"",mobile:"",sms:"",policy:!1}),{getFormRules:u}=I(s),{validForm:F}=P(d),S=E(()=>e(p)===z.REGISTER);function _(){return k(this,null,function*(){const f=yield F();!f||console.log(f)})}return(f,o)=>e(S)?(N(),V(T,{key:0},[a(R,{class:"enter-x"}),a(e(C),{class:"p-4 enter-x",model:s,rules:e(u),ref_key:"formRef",ref:d},{default:r(()=>[a(e(n),{name:"account",class:"enter-x"},{default:r(()=>[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(n),{name:"mobile",class:"enter-x"},{default:r(()=>[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(n),{name:"sms",class:"enter-x"},{default:r(()=>[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(n),{name:"password",class:"enter-x"},{default:r(()=>[a(e(q),{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(n),{name:"confirmPassword",class:"enter-x"},{default:r(()=>[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(n),{class:"enter-x",name:"policy"},{default:r(()=>[a(e(j),{checked:s.policy,"onUpdate:checked":o[5]||(o[5]=l=>s.policy=l),size:"small"},{default:r(()=>[y(v(e(t)("sys.login.policy")),1)]),_:1},8,["checked"])]),_:1}),a(e(b),{type:"primary",class:"enter-x",size:"large",block:"",onClick:_,loading:m.value},{default:r(()=>[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:r(()=>[y(v(e(t)("sys.login.backSignIn")),1)]),_:1},8,["onClick"])]),_:1},8,["model","rules"])],64)):D("",!0)}});export{oe as default};
