import{_ as y}from"./index-DIKmrNCq.js?v=1773287522785";import{_ as v}from"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import{i as S,m as h}from"./index-BTglIPU2.js?v=1773287522785";import{u as k}from"./useTableColumns-DDeyYvje.js?v=1773287522785";import{u as B}from"./useTableData-BmkIKQ_R.js?v=1773287522785";import{I as W,g as $,J as w}from"./setting-DouXuJGW.js?v=1773287522785";import{b as C,B as N}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{k as R,R as j,e as A,$ as D,Z as V,_ as a,a0 as s,S as n,a9 as _,j as I,aa as l,N as L}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./index-S15tYq5l.js?v=1773287522785";import"./copy-D-wIKr0q.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785";import"./index-Cg6fMjw6.js?v=1773287522785";const O={class:"p-20px"},P={class:"flex mb-16px"},T={class:"flex-1 mr-16px"},U={class:"w-230px mr-16px"},ot=R({__name:"config",setup(E){const{t:r}=j(),e=A({text:"",text2:""}),f=async()=>{if(e.text.trim()===""||e.text2.trim()===""){h.error(r("Waf.Setting.config_170"));return}await w(L(e)),e.text="",e.text2="",p()},{table:c,columns:d,setLoading:u}=B([{key:"text",title:r("Waf.Setting.config_164"),ellipsis:{tooltip:!0}},{key:"text2",title:r("Waf.Setting.config_165"),ellipsis:{tooltip:!0}},k({width:80,options:t=>[{label:r("Public.Btn.Del"),onClick:async()=>{await W({body:{[t.text]:t.text2}}),p()}}]})]),p=async()=>{try{u(!0);const{message:t}=await $();S(t)&&(c.data=t.body_character_string.map(o=>{const i=Object.keys(o);return{text:i[0],text2:o[i[0]]}}))}finally{u(!1)}};return p(),(t,o)=>{const i=C,g=N,x=v,b=y;return D(),V("div",O,[a("div",P,[a("div",T,[s(i,{value:n(e).text,"onUpdate:value":o[0]||(o[0]=m=>n(e).text=m),placeholder:t.$t("Waf.Setting.config_164")},null,8,["value","placeholder"])]),a("div",U,[s(i,{value:n(e).text2,"onUpdate:value":o[1]||(o[1]=m=>n(e).text2=m),placeholder:t.$t("Waf.Setting.config_165")},null,8,["value","placeholder"])]),s(g,{type:"primary",onClick:f},{default:_(()=>[I(l(t.$t("Public.Btn.Add")),1)]),_:1})]),s(x,{"max-height":230,loading:n(c).loading,data:n(c).data,columns:n(d)},null,8,["loading","data","columns"]),s(b,{class:"mt-16px"},{default:_(()=>[a("li",null,l(t.$t("Waf.Setting.config_166")),1),a("li",null,l(t.$t("Waf.Setting.config_167")),1),a("li",null,l(t.$t("Waf.Setting.config_168")),1),a("li",null,l(t.$t("Waf.Setting.config_169")),1)]),_:1})])}}});export{ot as default};
