import{d as g,r as _,x as A,o as c,A as f,B as t,f as s,a as e,E as y,k as F,a2 as U,a8 as C,V as j,W as q,K as B,Z as E,__tla as K}from"./index-92ad187a.js";import{_ as R,__tla as S}from"./Dialog-44c9fa34.js";import{a as W,__tla as Z}from"./index-b38ee4d2.js";import{u as z,__tla as D}from"./useMessage-d9788660.js";let v,G=Promise.all([(()=>{try{return K}catch{}})(),(()=>{try{return S}catch{}})(),(()=>{try{return Z}catch{}})(),(()=>{try{return D}catch{}})()]).then(async()=>{v=g({name:"SystemAreaForm",__name:"AreaForm",setup(H,{expose:V}){const h=z(),u=_(!1),o=_(!1),a=_({ip:"",result:void 0}),b=A({ip:[{required:!0,message:"IP \u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),d=_();V({open:async()=>{u.value=!0,x()}});const P=async()=>{if(d&&await d.value.validate()){o.value=!0;try{a.value.result=await W(a.value.ip.trim()),h.success("\u67E5\u8BE2\u6210\u529F")}finally{o.value=!1}}},x=()=>{var i;a.value={ip:"",result:void 0},(i=d.value)==null||i.resetFields()};return(i,l)=>{const m=C,n=j,I=q,p=B,k=R,w=E;return c(),f(k,{modelValue:e(u),"onUpdate:modelValue":l[3]||(l[3]=r=>U(u)?u.value=r:null),title:"IP \u67E5\u8BE2"},{footer:t(()=>[s(p,{disabled:e(o),type:"primary",onClick:P},{default:t(()=>[y("\u786E \u5B9A")]),_:1},8,["disabled"]),s(p,{onClick:l[2]||(l[2]=r=>u.value=!1)},{default:t(()=>[y("\u53D6 \u6D88")]),_:1})]),default:t(()=>[F((c(),f(I,{ref_key:"formRef",ref:d,model:e(a),rules:e(b),"label-width":"80px"},{default:t(()=>[s(n,{label:"IP",prop:"ip"},{default:t(()=>[s(m,{modelValue:e(a).ip,"onUpdate:modelValue":l[0]||(l[0]=r=>e(a).ip=r),placeholder:"\u8BF7\u8F93\u5165 IP \u5730\u5740"},null,8,["modelValue"])]),_:1}),s(n,{label:"\u5730\u5740",prop:"result"},{default:t(()=>[s(m,{modelValue:e(a).result,"onUpdate:modelValue":l[1]||(l[1]=r=>e(a).result=r),placeholder:"\u5C55\u793A\u67E5\u8BE2 IP \u7ED3\u679C",readonly:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[w,e(o)]])]),_:1},8,["modelValue"])}}})});export{v as _,G as __tla};
