System.register(["./public-legacy.js?v=1749179669910","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1749179669910","./page_layout-legacy.js?v=1749179669910","./site-legacy.js?v=1749179669910","./index.vue_vue_type_script_setup_true_lang-legacy15.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,t){"use strict";var n,s,a,i,l,o,r,c,u,d,_,p,v,g,m,P,y,x,f,h,S,j,H,b;return{setters:[e=>{n=e.d,s=e._,a=e.u},e=>{i=e._},e=>{l=e.cs,o=e.N,r=e.c,c=e.m},e=>{u=e.aq,d=e.b0},e=>{_=e._},e=>{p=e.d,v=e.O,g=e.j,m=e.r,P=e.R,y=e.S,x=e.P,f=e.a1,h=e.U,S=e.V,j=e.a2},e=>{H=e.cp,b=e.cj},null,null],execute:function(){const t={class:"p-20px"},w={class:"w-200px"};e("default",p({__name:"batch",props:{data:{}},setup(e,{expose:p}){const{t:E}=v(),$=e,{rows:q}=$.data,R=l(),M=g({version:null}),O={version:{trigger:"change",validator:()=>null!==M.version||new Error(E("Site.PHP.add_site_27"))}},U=m([]),{loading:k,setLoading:C}=n();(async()=>{try{C(!0);const{message:e}=await u();o(e)&&e.length>0?(U.value=e.map((e=>({label:e.name,value:e.version}))),M.version=e[0].version):(M.version=null,U.value=[])}finally{C(!1)}})();const L=()=>{const{version:e}=M;if(null===e)throw c.error(E("Site.PHP.index_67")),new Error(E("Site.PHP.index_67"));return{version:e,sites_id:q.map((e=>e.id)).join(",")}};return p({onConfirm:async({hide:e})=>{const{message:t}=await d(L());R.setRefresh(!0),r(t)&&(e=>{const{success:t,error:n}=e,s=[];t.forEach((e=>{const t=q.find((t=>t.name===e));t&&s.push({name:t.name,batchStatus:"success",reqMsg:E("Site.PHP.index_64")})})),Object.entries(n).forEach((([e,t])=>{const n=q.find((t=>t.name===e));n&&s.push({name:n.name,batchStatus:"error",reqMsg:t})})),a({title:E("Site.PHP.index_65"),width:440,footer:!0,component:_,data:{title:E("Site.PHP.index_66"),data:s,status:"done",columns:[{key:"name",title:E("Site.TableRow.index_1"),ellipsis:{tooltip:{width:"trigger"}}}]}})})(t),e()}}),(e,n)=>{const a=H,l=b,o=i,r=s;return P(),y("div",t,[x(o,{model:S(M),rules:O},{default:f((()=>[x(l,{label:e.$t("Site.PHP.add_site_21"),path:"version"},{default:f((()=>[h("div",w,[x(a,{value:S(M).version,"onUpdate:value":n[0]||(n[0]=e=>S(M).version=e),loading:S(k),options:S(U)},null,8,["value","loading","options"])])])),_:1},8,["label"])])),_:1},8,["model"]),x(r,{class:"mt-8px"},{default:f((()=>[h("li",null,j(e.$t("Site.PHP.index_61")),1),h("li",null,j(e.$t("Site.PHP.index_62")),1),h("li",null,j(e.$t("Site.PHP.index_63")),1)])),_:1})])}}}))}}}));
