import{c as t,f as a,h as e,_ as l}from"./public.js?v=1763625242172";import{c as s,m as i}from"./page_layout.js?v=1763625242172";import{I as n,g as o,J as c}from"./setting.js?v=1763625242172";import{au as r,aC as p}from"./naive.js?v=1763625242172";import{k as f,P as m,e as g,R as u,S as d,U as x,X as _,V as y,a3 as v,j,a4 as S,N as b}from"./vue.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";const h={class:"p-20px"},W={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(),C=g({text:"",text2:""}),P=async()=>{""!==C.text.trim()&&""!==C.text2.trim()?(await c(b(C)),C.text="",C.text2="",D()):i.error(w("Waf.Setting.config_170"))},{table:U,columns:B,setLoading:A}=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}}),D()}}]})]),D=async()=>{try{A(!0);const{message:t}=await o();s(t)&&(U.data=t.body_character_string.map((t=>{const a=Object.keys(t);return{text:a[0],text2:t[a[0]]}})))}finally{A(!1)}};return D(),(t,a)=>{const s=r,i=p,n=e,o=l;return u(),d("div",h,[x("div",W,[x("div",$,[_(s,{value:y(C).text,"onUpdate:value":a[0]||(a[0]=t=>y(C).text=t),placeholder:t.$t("Waf.Setting.config_164")},null,8,["value","placeholder"])]),x("div",k,[_(s,{value:y(C).text2,"onUpdate:value":a[1]||(a[1]=t=>y(C).text2=t),placeholder:t.$t("Waf.Setting.config_165")},null,8,["value","placeholder"])]),_(i,{type:"primary",onClick:P},{default:v((()=>[j(S(t.$t("Public.Btn.Add")),1)])),_:1})]),_(n,{"max-height":230,loading:y(U).loading,data:y(U).data,columns:y(B)},null,8,["loading","data","columns"]),_(o,{class:"mt-16px"},{default:v((()=>[x("li",null,S(t.$t("Waf.Setting.config_166")),1),x("li",null,S(t.$t("Waf.Setting.config_167")),1),x("li",null,S(t.$t("Waf.Setting.config_168")),1),x("li",null,S(t.$t("Waf.Setting.config_169")),1)])),_:1})])}}});export{w as default};
