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