import{c as a,f as l,h as t,_ as s}from"./public.js?v=1763625242172";import{k as n,P as e,r as i,R as o,S as r,U as u,X as c,V as m,aj as f,ak as p,a3 as d,j as g,a4 as _}from"./vue.js?v=1763625242172";import{x as v,m as j}from"./page_layout.js?v=1763625242172";import{E as y,F as x,G as b}from"./setting.js?v=1763625242172";import{au as h,aC as S}from"./naive.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";const k={class:"p-20px"},W={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 o(),r("div",k,[u("div",W,[u("div",$,[c(n,{value:m(C),"onUpdate:value":l[0]||(l[0]=a=>f(C)?C.value=a:null),placeholder:a.$t("Waf.Setting.config_116"),onKeyup:p(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:m(U).loading,data:m(U).data,columns:m(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};
