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