import{n as e,Q as s,P as a,k as r}from"./utils-lib.js?v=1761009159";import{c as o,aA as t,o as i,r as l,q as d,v as n,x as m,e as p,B as u,y as c,z as f,ab as w,a9 as b}from"./base-lib.js?v=1761009159";import{_}from"./index219.js?v=1761009159";import{bb as j}from"./firewall.js?v=1761009159";import{f as v}from"./validator.js?v=1761009159";import{g as h}from"./useStore5.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";import"./column.js?v=1761009159";const x={class:"ml-[10rem]"},g=o({__name:"index",setup(o,{expose:g}){const{refs:{isRefreshSpywares:y}}=h(),D=t("popupClose"),R=i({dirs:""}),V=l(),z=l(!1),E={dirs:[{validator:(e,s,a)=>{if(!(s.length>0))return a(new Error("请输入目录"));a()},trigger:["blur","change"]}]},S=[{content:"添加指定目录",event:()=>{v({type:"dir",change(e){""!=R.dirs?R.dirs=R.dirs+"\n"+e:R.dirs=e}})}},{content:"添加网站目录",event:()=>e({title:"添加网站目录",area:50,component:()=>s(()=>import("./add-website-dir.js?v=1761009159"),__vite__mapDeps([]),import.meta.url),compData:R,showFooter:!0})}];return d(()=>{}),g({onConfirm:async e=>{await V.value.validate(),a({request:j({data:JSON.stringify({dirs:R.dirs.split("\n")})}),loading:z,success:()=>{D(),y.value=!0}})}}),(e,s)=>{const a=r,o=w,t=_,i=b;return n(),m("div",null,[p(i,{disabled:c(z),ref_key:"addDir",ref:V,rules:E,model:c(R),class:"p-[2rem] addDirFrom overflow-auto max-h-[60rem]","label-width":"5rem"},{default:u(()=>[p(o,{label:"目录",prop:"dirs"},{default:u(()=>[p(a,{type:"textarea",modelValue:c(R).dirs,"onUpdate:modelValue":s[0]||(s[0]=e=>c(R).dirs=e),width:"30rem",class:"resize-none",autosize:{minRows:5,maxRows:5},placeholder:"如需填写多个目录请换行填写\n例：/www/aaa /www/bbb",clearable:""},null,8,["modelValue"])]),_:1}),p(o,null,{default:u(()=>[f("div",x,[p(t,{options:S})])]),_:1})]),_:1},8,["disabled","model"])])}}});export{g as default};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = []
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
