System.register(["./index-legacy.js?v=1753954525509","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1753954525509","./page_layout-legacy.js?v=1753954525509","./public-legacy.js?v=1753954525509","./naive-legacy.js?v=1753954525509","./vue-legacy.js?v=1753954525509","./common-legacy.js?v=1753954525509","./__commonjsHelpers__-legacy.js?v=1753954525509"],(function(e,a){"use strict";var t,l,i,n,s,d,u,o,c,r,p,_,m,y,v,x,h,w,g,f,P,b,j,S,H,$,k,C,U,q,N;return{setters:[e=>{t=e._},e=>{l=e._},e=>{i=e.dJ,n=e.S,s=e.w,d=e.m,u=e.dK,o=e.dL},e=>{c=e.e,r=e.b,p=e.h,_=e.d},e=>{m=e.aq,y=e.ay,v=e.bY,x=e.c2,h=e.cA},e=>{w=e.k,g=e.P,f=e.r,P=e.e,b=e.U,j=e.V,S=e.Q,H=e.a2,$=e.W,k=e.X,C=e.ah,U=e.j,q=e.a3,N=e.N},null,null],execute:function(){const a={class:"p-20px"},A={class:"flex-1"},D={class:"mt-12px"},E={class:"px-20px pt-24px pb-8px"},J={class:"w-150px"};e("default",w({__name:"set",props:{data:{}},setup(e){const{t:w}=g(),K=e,{setOptions:L}=K.data,O=f(""),Q=async()=>{const e=O.value.trim();""!==e?(await u({name:e}),O.value="",await F(),L?.(z.data)):d.error(w("Site.PHP.index_46"))},R=c(),V=f(null),W=P({type_id:-1,name:""}),X={name:{required:!0,message:w("Site.PHP.index_46"),trigger:["blur","change"]}},Y=async({hide:e})=>{await(V.value?.validate()),await o(N(W)),await F(),L?.(z.data),e()},{table:z,columns:B}=r([{key:"name",title:"Name"},p({width:80,options:e=>[{label:"Edit",onClick:()=>{(e=>{W.type_id=e.type_id,W.name=e.name,R.title=`${w("Site.PHP.index_48")} [${e.name}]`,R.show=!0})(e)}},{label:"Del",onClick:()=>{_({title:`${w("Site.PHP.index_49")} [${e.name}]`,content:w("Site.PHP.index_50"),onConfirm:async({hide:a})=>{await i({type_id:e.type_id}),await F(),L?.(z.data,e.type_id),a()}})}}]})]),F=async()=>{const{message:e}=await n();z.data=s(e)?e:[]};return F(),(e,i)=>{const n=m,s=y,d=v,u=x,o=h,c=l,r=t;return b(),j("div",a,[S(d,null,{default:H((()=>[$("div",A,[S(n,{value:k(O),"onUpdate:value":i[0]||(i[0]=e=>C(O)?O.value=e:null),placeholder:e.$t("Site.PHP.index_46")},null,8,["value","placeholder"])]),$("div",null,[S(s,{type:"primary",onClick:Q},{default:H((()=>[U(q(e.$t("Site.Cert.index_62")),1)])),_:1})])])),_:1}),$("div",D,[S(u,{"max-height":300,data:k(z).data,columns:k(B)},null,8,["data","columns"])]),S(r,{show:k(R).show,"onUpdate:show":i[2]||(i[2]=e=>k(R).show=e),title:k(R).title,width:350,footer:!0,onConfirm:Y},{default:H((()=>[$("div",E,[S(c,{ref_key:"formRef",ref:V,model:k(W),rules:X},{default:H((()=>[S(o,{label:e.$t("Site.PHP.index_47"),path:"name"},{default:H((()=>[$("div",J,[S(n,{value:k(W).name,"onUpdate:value":i[1]||(i[1]=e=>k(W).name=e),placeholder:""},null,8,["value"])])])),_:1},8,["label"])])),_:1},8,["model"])])])),_:1},8,["show","title"])])}}}))}}}));
