import{_ as g}from"./index-DIKmrNCq.js?v=1773287522785";import{_ as x}from"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import{n as y}from"./index-BTglIPU2.js?v=1773287522785";import{u as S}from"./useTableData-BmkIKQ_R.js?v=1773287522785";import{n as h,o as C}from"./site-D0zX56Uh.js?v=1773287522785";import{k as N,R as b,a0 as l,$ as k,Z as W,S as m,a9 as $,_ as p,aa as _}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a8 as w}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";const B={class:"p-20px"},U=N({__name:"index",props:{name:{default:""},rule:{default:""},siteName:{default:""}},setup(c){const r=c,{t:n}=b(),{table:i,columns:f,setLoading:u}=S([{key:"rule",title:n("Waf.Site.Config.index_66")},{key:"ps",title:n("Waf.Site.Config.index_4"),width:180},{key:"status",title:n("Waf.Site.Config.index_5"),width:60,render:(t,s)=>l(w,{size:"small",value:t.status,onUpdateValue:async e=>{const{siteName:a,rule:o}=r;await h({index:s,siteName:a,ruleName:o}),t.status=e}},null)}]);return(async()=>{try{u(!0);const{siteName:t,rule:s}=r,{message:e}=await C({siteName:t,ruleName:s});y(e)&&(i.data=e.map(([a,o,d])=>({status:!!a,rule:o,ps:d})))}finally{u(!1)}})(),(t,s)=>{const e=x,a=g;return k(),W("div",B,[l(e,{"max-height":420,loading:m(i).loading,data:m(i).data,columns:m(f)},null,8,["loading","data","columns"]),l(a,{class:"mt-16px"},{default:$(()=>[p("li",null,_(t.$t("Waf.Site.Config.index_71")),1),p("li",null,_(t.$t("Waf.Site.Config.index_72")),1)]),_:1})])}}});export{U as default};
