import{d as W,r as d,x as j,o as _,A as m,B as t,f as u,a as l,E as y,k as q,c as C,F as T,R as K,a2 as A,a8 as B,V as D,S as E,U as P,W as Z,K as z,Z as G,__tla as H}from"./index-92ad187a.js";import{_ as I,__tla as J}from"./Dialog-44c9fa34.js";import{a as L,v as M,__tla as N}from"./index-546c0e4c.js";import{u as O,__tla as Q}from"./useMessage-d9788660.js";let g,X=Promise.all([(()=>{try{return H}catch{}})(),(()=>{try{return J}catch{}})(),(()=>{try{return N}catch{}})(),(()=>{try{return Q}catch{}})()]).then(async()=>{g=W({name:"SystemSensitiveWordTestForm",__name:"SensitiveWordTestForm",setup(Y,{expose:x}){const c=O(),r=d(!1),i=d(!1),s=d({text:"",tags:[]}),h=j({text:[{required:!0,message:"\u6D4B\u8BD5\u6587\u672C\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],tags:[{required:!0,message:"\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),n=d(),p=d([]);x({open:async()=>{r.value=!0,V(),p.value=await L()}});const b=async()=>{if(n&&await n.value.validate()){i.value=!0;try{const o=s.value,e=await M(o);if(e.length===0)return void c.success("\u4E0D\u5305\u542B\u654F\u611F\u8BCD\uFF01");c.warning("\u5305\u542B\u654F\u611F\u8BCD\uFF1A"+e.join(", ")),r.value=!1}finally{i.value=!1}}},V=()=>{var o;s.value={text:"",tags:[]},(o=n.value)==null||o.resetFields()};return(o,e)=>{const w=B,f=D,k=E,F=P,S=Z,v=z,U=I,R=G;return _(),m(U,{modelValue:l(r),"onUpdate:modelValue":e[3]||(e[3]=a=>A(r)?r.value=a:null),title:"\u68C0\u6D4B\u654F\u611F\u8BCD"},{footer:t(()=>[u(v,{disabled:l(i),type:"primary",onClick:b},{default:t(()=>[y("\u68C0 \u6D4B")]),_:1},8,["disabled"]),u(v,{onClick:e[2]||(e[2]=a=>r.value=!1)},{default:t(()=>[y("\u53D6 \u6D88")]),_:1})]),default:t(()=>[q((_(),m(S,{ref_key:"formRef",ref:n,model:l(s),rules:l(h),"label-width":"80px"},{default:t(()=>[u(f,{label:"\u6587\u672C",prop:"text"},{default:t(()=>[u(w,{modelValue:l(s).text,"onUpdate:modelValue":e[0]||(e[0]=a=>l(s).text=a),placeholder:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u6587\u672C",type:"textarea"},null,8,["modelValue"])]),_:1}),u(f,{label:"\u6807\u7B7E",prop:"tags"},{default:t(()=>[u(F,{modelValue:l(s).tags,"onUpdate:modelValue":e[1]||(e[1]=a=>l(s).tags=a),"allow-create":"",filterable:"",multiple:"",placeholder:"\u8BF7\u9009\u62E9\u6807\u7B7E",style:{width:"380px"}},{default:t(()=>[(_(!0),C(T,null,K(l(p),a=>(_(),m(k,{key:a,label:a,value:a},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[R,l(i)]])]),_:1},8,["modelValue"])}}})});export{g as _,X as __tla};
