import{c as a,h as e,_ as t}from"./public.js?v=1763625242172";import{x as s}from"./page_layout.js?v=1763625242172";import{n as i,o as l}from"./site3.js?v=1763625242172";import{k as n,P as o,X as m,R as u,S as r,V as d,a3 as f,U as p,a4 as c}from"./vue.js?v=1763625242172";import{dj as _}from"./naive.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";const g={class:"p-20px"},x=n({__name:"index",props:{name:{default:""},rule:{default:""},siteName:{default:""}},setup(n){const x=n,{t:j}=o(),{table:y,columns:N,setLoading:S}=a([{key:"rule",title:j("Waf.Site.Config.index_66")},{key:"ps",title:j("Waf.Site.Config.index_4"),width:180},{key:"status",title:j("Waf.Site.Config.index_5"),width:60,render:(a,e)=>m(_,{size:"small",value:a.status,onUpdateValue:async t=>{const{siteName:s,rule:l}=x;await i({index:e,siteName:s,ruleName:l}),a.status=t}},null)}]);return(async()=>{try{S(!0);const{siteName:a,rule:e}=x,{message:t}=await l({siteName:a,ruleName:e});s(t)&&(y.data=t.map((([a,e,t])=>({status:!!a,rule:e,ps:t}))))}finally{S(!1)}})(),(a,s)=>{const i=e,l=t;return u(),r("div",g,[m(i,{"max-height":420,loading:d(y).loading,data:d(y).data,columns:d(N)},null,8,["loading","data","columns"]),m(l,{class:"mt-16px"},{default:f((()=>[p("li",null,c(a.$t("Waf.Site.Config.index_71")),1),p("li",null,c(a.$t("Waf.Site.Config.index_72")),1)])),_:1})])}}});export{x as default};
