var _=(g,l,a)=>new Promise((c,i)=>{var f=o=>{try{n(a.next(o))}catch(r){i(r)}},m=o=>{try{n(a.throw(o))}catch(r){i(r)}},n=o=>o.done?c(o.value):Promise.resolve(o.value).then(f,m);n((a=a.apply(g,l)).next())});import{a as I,c as B,r as k,m as L,f as S,k as e,o as h,h as w,j as s,p as t,I as z,B as x,q as b,t as y,F as R,aS as V}from"./index.0d073eaa.js";/* empty css              *//* empty css              */import{C as E}from"./index.e8daa066.js";import{u as N,a as D,L as M,_ as U,b as j}from"./LoginFormTitle.620e6f7b.js";import{F}from"./Form.48352728.js";import"./Col.a2eadc78.js";import"./useFlexGapSupport.474c31b7.js";import"./_baseIteratee.3919e7cf.js";import"./get.49a42f2e.js";import"./useSize.bb4e5ce5.js";const X=I({__name:"MobileForm",setup(g){const l=F.Item,{t:a}=B(),{handleBackLogin:c,getLoginState:i}=N(),{getFormRules:f}=D(),m=k(),n=k(!1),o=L({mobile:"",sms:""}),{validForm:r}=j(m),v=S(()=>e(i)===M.MOBILE);function C(){return _(this,null,function*(){const p=yield r();!p||console.log(p)})}return(p,u)=>e(v)?(h(),w(R,{key:0},[s(U,{class:"enter-x"}),s(e(F),{class:"p-4 enter-x",model:o,rules:e(f),ref_key:"formRef",ref:m},{default:t(()=>[s(e(l),{name:"mobile",class:"enter-x"},{default:t(()=>[s(e(z),{size:"large",value:o.mobile,"onUpdate:value":u[0]||(u[0]=d=>o.mobile=d),placeholder:e(a)("sys.login.mobile"),class:"fix-auto-fill"},null,8,["value","placeholder"])]),_:1}),s(e(l),{name:"sms",class:"enter-x"},{default:t(()=>[s(e(E),{size:"large",class:"fix-auto-fill",value:o.sms,"onUpdate:value":u[1]||(u[1]=d=>o.sms=d),placeholder:e(a)("sys.login.smsCode")},null,8,["value","placeholder"])]),_:1}),s(e(l),{class:"enter-x"},{default:t(()=>[s(e(x),{type:"primary",size:"large",block:"",onClick:C,loading:n.value},{default:t(()=>[b(y(e(a)("sys.login.loginButton")),1)]),_:1},8,["loading"]),s(e(x),{size:"large",block:"",class:"mt-4",onClick:e(c)},{default:t(()=>[b(y(e(a)("sys.login.backSignIn")),1)]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model","rules"])],64)):V("",!0)}});export{X as default};
