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