System.register(["./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./index-legacy-De9vt8IT.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./useLoading-legacy-IiShPpjk.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785"],(function(e,a){"use strict";var l,t,s,n,u,i,r,d,o,c,v,_,g,p,y,f,m,j,h;return{setters:[e=>{l=e._},e=>{t=e.u},e=>{s=e.cO,n=e.n,u=e.hv,i=e.m},e=>{r=e.u},e=>{d=e.k,o=e.R,c=e.r,v=e.$,_=e.Z,g=e.a0,p=e.a9,y=e._,f=e.S,m=e.X},e=>{j=e.a1,h=e.a6},null],execute:function(){const a={class:"p-20px"},w={class:"w-150px"};e("default",d({__name:"batch",props:{data:{}},setup(e,{expose:d}){const x=e,{t:P}=o(),{rows:b}=x.data,S=t(),H=c(null),Z=c([]),{loading:k,setLoading:L}=r();return(async()=>{try{L(!0);const{message:e}=await s();n(e)&&e.length>0?(Z.value=e.map((e=>({label:e.name,value:e.id}))),H.value=e[0].id):(H.value=null,Z.value=[])}finally{L(!1)}})(),d({onConfirm:async({hide:e})=>{await u((()=>{if(null===H.value)throw i.error(P("Site.PHP.add_site_46")),new Error(P("Site.PHP.add_site_46"));return{id:H.value,site_ids:b.map((e=>e.id))}})()),S.setRefresh(!0),e()}}),(e,t)=>{const s=h,n=j,u=l;return v(),_("div",a,[g(u,null,{default:p((()=>[g(n,{label:e.$t("Site.PHP.add_site_22"),"show-feedback":!1},{default:p((()=>[y("div",w,[g(s,{value:f(H),"onUpdate:value":t[0]||(t[0]=e=>m(H)?H.value=e:null),loading:f(k),options:f(Z)},null,8,["value","loading","options"])])])),_:1},8,["label"])])),_:1})])}}}))}}}));
