import{b as a,h as l,f as t,_ as s}from"./public.js?v=1753954525509";import{k as n,P as e,r as i,U as o,V as r,W as u,Q as c,X as m,ah as f,at as p,a2 as d,j as g,a3 as _}from"./vue.js?v=1753954525509";import{w as v,m as y}from"./page_layout.js?v=1753954525509";import{E as j,F as x,G as b}from"./setting.js?v=1753954525509";import{aq as h,ay as W}from"./naive.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";const w={class:"p-20px"},S={class:"flex mb-16px"},$={class:"flex-1 mr-16px"},k=n({__name:"config",setup(n){const{t:k}=e(),P=i(""),U=async()=>{""!==P.value.trim()?(await b({url_find:P.value}),P.value="",q()):y.error(k("Waf.Setting.config_81"))},{table:B,columns:C,setLoading:L}=a([{key:"url",title:"URL"},l({width:80,options:a=>[{label:k("Public.Btn.Del"),onClick:async()=>{await j({url_find:a.url}),q()}}]})]),q=async()=>{try{L(!0);const{message:a}=await x();v(a)&&(B.data=a.map((a=>({url:a}))))}finally{L(!1)}};return q(),(a,l)=>{const n=h,e=W,i=t,v=s;return o(),r("div",w,[u("div",S,[u("div",$,[c(n,{value:m(P),"onUpdate:value":l[0]||(l[0]=a=>f(P)?P.value=a:null),placeholder:a.$t("Waf.Setting.config_116"),onKeyup:p(U,["enter"])},null,8,["value","placeholder"])]),c(e,{type:"primary",onClick:U},{default:d((()=>[g(_(a.$t("Public.Btn.Add")),1)])),_:1})]),c(i,{"max-height":368,loading:m(B).loading,data:m(B).data,columns:m(C)},null,8,["loading","data","columns"]),c(v,{class:"mt-16px"},{default:d((()=>[u("li",null,_(a.$t("Waf.Setting.config_117")),1),u("li",null,_(a.$t("Waf.Setting.config_118")),1),u("li",null,_(a.$t("Waf.Setting.config_119")),1)])),_:1})])}}});export{k as default};
