import{_ as b,d as w,w as v,W as B,r as i,o as g,G as E,C as l,j as o,l as t,J as y,h,M as _,L as D,as as R}from"./index.js";import{M as d}from"./motion.48e85625.js";import{p as U}from"./rule.14c086a2.js";import{u as c,E as N}from"./verifyCode.d1babc48.js";const T={class:"w-full flex justify-between"},j=w({__name:"phone",setup(z){const a=v(!1),n=B({phone:"",verifyCode:""}),f=v(),{isDisabled:C,text:k}=c(),x=async p=>{a.value=!0,p&&await p.validate((e,u)=>{if(e)setTimeout(()=>{N.success("\u767B\u5F55\u6210\u529F"),a.value=!1},2e3);else return a.value=!1,u})};function V(){c().end(),R().SET_CURRENTPAGE(0)}return(p,e)=>{const u=i("el-input"),r=i("el-form-item"),m=i("el-button"),F=i("el-form");return g(),E(F,{ref_key:"ruleFormRef",ref:f,model:n,rules:t(U),size:"large"},{default:l(()=>[o(t(d),null,{default:l(()=>[o(r,{prop:"phone"},{default:l(()=>[o(u,{clearable:"",modelValue:n.phone,"onUpdate:modelValue":e[0]||(e[0]=s=>n.phone=s),placeholder:"\u624B\u673A\u53F7\u7801","prefix-icon":t(y)("iphone")},null,8,["modelValue","prefix-icon"])]),_:1})]),_:1}),o(t(d),{delay:100},{default:l(()=>[o(r,{prop:"verifyCode"},{default:l(()=>[h("div",T,[o(u,{clearable:"",modelValue:n.verifyCode,"onUpdate:modelValue":e[1]||(e[1]=s=>n.verifyCode=s),placeholder:"\u77ED\u4FE1\u9A8C\u8BC1\u7801","prefix-icon":t(y)("ri:shield-keyhole-line",{online:!0})},null,8,["modelValue","prefix-icon"]),o(m,{disabled:t(C),class:"ml-2",onClick:e[2]||(e[2]=s=>t(c)().start(f.value,"phone"))},{default:l(()=>[_(D(t(k)),1)]),_:1},8,["disabled"])])]),_:1})]),_:1}),o(t(d),{delay:150},{default:l(()=>[o(r,null,{default:l(()=>[o(m,{class:"w-full",size:"default",type:"primary",loading:a.value,onClick:e[3]||(e[3]=s=>x(f.value))},{default:l(()=>e[4]||(e[4]=[_(" \u767B\u5F55 ")])),_:1},8,["loading"])]),_:1})]),_:1}),o(t(d),{delay:200},{default:l(()=>[o(r,null,{default:l(()=>[o(m,{class:"w-full",size:"default",onClick:V},{default:l(()=>e[5]||(e[5]=[_(" \u8FD4\u56DE ")])),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])}}});var L=b(j,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/login/components/phone.vue"]]);export{L as default};
