import{b as t,h as a,f as e,_ as l}from"./public.js?v=1753954525509";import{c as s,m as i}from"./page_layout.js?v=1753954525509";import{I as n,g as o,J as c}from"./setting.js?v=1753954525509";import{aq as r,ay as p}from"./naive.js?v=1753954525509";import{k as f,P as m,e as g,U as u,V as d,W as x,Q as _,X as y,a2 as v,j as b,a3 as j,N as W}from"./vue.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";const h={class:"p-20px"},S={class:"flex mb-16px"},$={class:"flex-1 mr-16px"},k={class:"w-230px mr-16px"},w=f({__name:"config",setup(f){const{t:w}=m(),P=g({text:"",text2:""}),U=async()=>{""!==P.text.trim()&&""!==P.text2.trim()?(await c(W(P)),P.text="",P.text2="",A()):i.error(w("Waf.Setting.config_170"))},{table:B,columns:C,setLoading:q}=t([{key:"text",title:w("Waf.Setting.config_164"),ellipsis:{tooltip:!0}},{key:"text2",title:w("Waf.Setting.config_165"),ellipsis:{tooltip:!0}},a({width:80,options:t=>[{label:w("Public.Btn.Del"),onClick:async()=>{await n({body:{[t.text]:t.text2}}),A()}}]})]),A=async()=>{try{q(!0);const{message:t}=await o();s(t)&&(B.data=t.body_character_string.map((t=>{const a=Object.keys(t);return{text:a[0],text2:t[a[0]]}})))}finally{q(!1)}};return A(),(t,a)=>{const s=r,i=p,n=e,o=l;return u(),d("div",h,[x("div",S,[x("div",$,[_(s,{value:y(P).text,"onUpdate:value":a[0]||(a[0]=t=>y(P).text=t),placeholder:t.$t("Waf.Setting.config_164")},null,8,["value","placeholder"])]),x("div",k,[_(s,{value:y(P).text2,"onUpdate:value":a[1]||(a[1]=t=>y(P).text2=t),placeholder:t.$t("Waf.Setting.config_165")},null,8,["value","placeholder"])]),_(i,{type:"primary",onClick:U},{default:v((()=>[b(j(t.$t("Public.Btn.Add")),1)])),_:1})]),_(n,{"max-height":230,loading:y(B).loading,data:y(B).data,columns:y(C)},null,8,["loading","data","columns"]),_(o,{class:"mt-16px"},{default:v((()=>[x("li",null,j(t.$t("Waf.Setting.config_166")),1),x("li",null,j(t.$t("Waf.Setting.config_167")),1),x("li",null,j(t.$t("Waf.Setting.config_168")),1),x("li",null,j(t.$t("Waf.Setting.config_169")),1)])),_:1})])}}});export{w as default};
