var _=(g,l,o)=>new Promise((c,i)=>{var f=a=>{try{n(o.next(a))}catch(r){i(r)}},m=a=>{try{n(o.throw(a))}catch(r){i(r)}},n=a=>a.done?c(a.value):Promise.resolve(a.value).then(f,m);n((o=o.apply(g,l)).next())});import{a as I,c as L,r as k,m as B,f as h,k as e,o as S,h as w,j as s,p as t,I as z,B as x,q as b,t as y,F as R,aL as V}from"./index.bde7963b.js";import{F}from"./index.0103b3aa.js";import"./index.3289c967.js";import{C as E}from"./index.ce7c5e55.js";import{u as N,a as D,L as M,_ as U,b as j}from"./LoginFormTitle.8be4bfe0.js";import"./_baseIteratee.34b68bfe.js";const J=I({__name:"MobileForm",setup(g){const l=F.Item,{t:o}=L(),{handleBackLogin:c,getLoginState:i}=N(),{getFormRules:f}=D(),m=k(),n=k(!1),a=B({mobile:"",sms:""}),{validForm:r}=j(m),v=h(()=>e(i)===M.MOBILE);function C(){return _(this,null,function*(){const d=yield r();!d||console.log(d)})}return(d,u)=>e(v)?(S(),w(R,{key:0},[s(U,{class:"enter-x"}),s(e(F),{class:"p-4 enter-x",model:a,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:a.mobile,"onUpdate:value":u[0]||(u[0]=p=>a.mobile=p),placeholder:e(o)("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:a.sms,"onUpdate:value":u[1]||(u[1]=p=>a.sms=p),placeholder:e(o)("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(o)("sys.login.loginButton")),1)]),_:1},8,["loading"]),s(e(x),{size:"large",block:"",class:"mt-4",onClick:e(c)},{default:t(()=>[b(y(e(o)("sys.login.backSignIn")),1)]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model","rules"])],64)):V("",!0)}});export{J as default};
