System.register(["./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1753954525509","./page_layout-legacy.js?v=1753954525509","./public-legacy.js?v=1753954525509","./site-legacy.js?v=1753954525509","./index-legacy225.js?v=1753954525509","./vue-legacy.js?v=1753954525509","./naive-legacy.js?v=1753954525509","./common-legacy.js?v=1753954525509","./__commonjsHelpers__-legacy.js?v=1753954525509"],(function(e,a){"use strict";var l,t,s,n,u,i,c,o,r,d,_,g,p,v,y,m,f,j,w;return{setters:[e=>{l=e._},e=>{t=e.w,s=e.m},e=>{n=e.c},e=>{u=e.e,i=e.aN},e=>{c=e.u},e=>{o=e.k,r=e.P,d=e.r,_=e.U,g=e.V,p=e.Q,v=e.a2,y=e.W,m=e.X,f=e.ah},e=>{j=e.cG,w=e.cA},null,null],execute:function(){const a={class:"p-20px"},P={class:"w-150px"};e("default",o({__name:"category",props:{data:{}},setup(e,{expose:o}){const h=e,{t:x}=r(),{rows:b}=h.data,H=c(),S=d(null),k=d([]),{loading:U,setLoading:A}=n();return(async()=>{try{A(!0);const{message:e}=await u();t(e)&&e.length>0?(k.value=e.map((e=>({label:e.name,value:e.id}))),S.value=e[0].id):(S.value=null,k.value=[])}finally{A(!1)}})(),o({onConfirm:async({hide:e})=>{await i((()=>{if(null===S.value)throw s.error(x("Site.PHP.add_site_46")),new Error(x("Site.PHP.add_site_46"));return{id:S.value,site_ids:b.map((e=>e.id))}})()),H.setRefresh(!0),e()}}),(e,t)=>{const s=j,n=w,u=l;return _(),g("div",a,[p(u,null,{default:v((()=>[p(n,{label:e.$t("Site.PHP.add_site_22"),"show-feedback":!1},{default:v((()=>[y("div",P,[p(s,{value:m(S),"onUpdate:value":t[0]||(t[0]=e=>f(S)?S.value=e:null),loading:m(U),options:m(k)},null,8,["value","loading","options"])])])),_:1},8,["label"])])),_:1})])}}}))}}}));
