import{_ as a}from"./index105.js?v=1761009159";import{P as e,p as s,l as t,b as i}from"./utils-lib.js?v=1761009159";import{c as r,V as o,o as l,q as n,H as p,v as m,x as d,e as c,B as h,y as u,C as f,I as _,G as b}from"./base-lib.js?v=1761009159";import{_ as g}from"./index103.js?v=1761009159";import{bh as j,bi as y,bj as v}from"./firewall.js?v=1761009159";import{u as w}from"./column.js?v=1761009159";import{f as x}from"./validator.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";const q={class:"p-[2rem]"},C=r({__name:"index",setup(r){const C=i(),V=o([]),k=l({path:"",type:"dir"}),H=async()=>{e({request:j(),data:{"msg.scan_dir":[Array,a=>{V.value=a.map(a=>({path:a}))}]}})},I=async()=>{k.path?(await e({request:v({dir:k.path}),loading:"正在添加检测目录，请稍后...",message:!0}),H(),k.path=""):C.error("请填写检测目录")},P=[{label:"所在目录",prop:"path"},w([{onClick:async a=>{await s({icon:"question-filled",title:"删除检测目录",width:"34rem",content:"删除检测目录【"+a.path+"】，是否继续操作？"}),await e({request:y({path:JSON.stringify([a.path])}),loading:"正在删除检测目录，请稍后...",message:!0}),H()},title:"删除",isHide:a=>["/bin/","/sbin/","/usr/bin/","/usr/sbin/"].includes(a.path)}])];return n(()=>{H()}),(e,s)=>{const i=g,r=b,o=t,l=a,n=p("bt-loading");return m(),d("div",q,[c(l,null,{"header-left":h(()=>[c(i,{modelValue:u(k).path,"onUpdate:modelValue":s[0]||(s[0]=a=>u(k).path=a),name:"path",placeholder:"选择目录",icon:"icon-file_mode",onIconClick:s[1]||(s[1]=a=>{x({type:"dir",path:"/",change(a,e){a=a.replace(/\/\//g,"/"),k.path=a,k.type=e}})}),onChangePassive:s[2]||(s[2]=a=>{var e;k[e="path"]=k[e].replace(/\s+/g,"")}),width:"32rem"},null,8,["modelValue"]),c(r,{type:"primary",class:"!ml-[.8rem]",onClick:I},{default:h(()=>s[3]||(s[3]=[f(" 添加 ",-1)])),_:1,__:[3]})]),content:h(()=>[_(c(o,{ref:"detecList",column:P,data:u(V),description:"检测列表为空"},null,8,["data"]),[[n,"正在加载检测列表，请稍后...","title"]])]),_:1})])}}});export{C as default};
