System.register(["./index-legacy-DgZ0-E4f.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./useLoading-legacy-IiShPpjk.js?v=1773287522785","./index-legacy-De9vt8IT.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-DAbalqq3.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,t){"use strict";var s,n,i,a,l,r,o,u,c,d,_,p,v,g,m,h,f,P,x,y,S,w,j,H;return{setters:[e=>{s=e._},e=>{n=e._},e=>{i=e.ei,a=e.n,l=e.hu,r=e.i,o=e.p,u=e.m},e=>{c=e.u},e=>{d=e.u},e=>{_=e._},e=>{p=e.k,v=e.R,g=e.e,m=e.r,h=e.$,f=e.Z,P=e.a0,x=e.a9,y=e._,S=e.S,w=e.aa},e=>{j=e.a1,H=e.a6},null],execute:function(){const t={class:"p-20px"},b={class:"w-200px"};e("default",p({__name:"php",props:{rows:{},showStatic:{type:Boolean,default:!0},refresh:{}},setup(e,{expose:p}){const{t:$}=v(),E=e,{rows:R,showStatic:Z,refresh:k}=E,q=d(),L=g({version:null}),M={version:{trigger:"change",validator:()=>null!==L.version||new Error($("Site.PHP.add_site_27"))}},B=m([]),{loading:C,setLoading:O}=c();(async()=>{try{O(!0);const{message:e}=await i();if(a(e)&&e.length>0){const t=Z?e:e.filter((e=>"00"!==e.version));B.value=t.map((e=>({label:e.name,value:e.version}))),L.version=t[0].version}else L.version=null,B.value=[]}finally{O(!1)}})();const T=()=>{const{version:e}=L;if(null===e)throw u.error($("Site.PHP.index_67")),new Error($("Site.PHP.index_67"));return{version:e,sites_id:R.map((e=>e.id)).join(",")}};return p({onConfirm:async({hide:e})=>{const{message:t}=await l(T());q.setRefresh(!0),k?.(),r(t)&&(e=>{const{success:t,error:s}=e,n=[];t.forEach((e=>{const t=R.find((t=>t.name===e));t&&n.push({name:t.name,batchStatus:"success",reqMsg:$("Site.PHP.index_64")})})),Object.entries(s).forEach((([e,t])=>{const s=R.find((t=>t.name===e));s&&n.push({name:s.name,batchStatus:"error",reqMsg:t})})),o({title:$("Site.PHP.index_65"),width:440,footer:!0,component:_,data:{title:$("Site.PHP.index_66"),data:n,status:"done",columns:[{key:"name",title:$("Site.TableRow.index_1"),ellipsis:{tooltip:{width:"trigger"}}}]}})})(t),e()}}),(e,i)=>{const a=H,l=j,r=n,o=s;return h(),f("div",t,[P(r,{model:S(L),rules:M},{default:x((()=>[P(l,{label:e.$t("Site.PHP.add_site_21"),path:"version"},{default:x((()=>[y("div",b,[P(a,{value:S(L).version,"onUpdate:value":i[0]||(i[0]=e=>S(L).version=e),loading:S(C),options:S(B)},null,8,["value","loading","options"])])])),_:1},8,["label"])])),_:1},8,["model"]),P(o,{class:"mt-8px"},{default:x((()=>[y("li",null,w(e.$t("Site.PHP.index_61")),1),y("li",null,w(e.$t("Site.PHP.index_62")),1),y("li",null,w(e.$t("Site.PHP.index_63")),1)])),_:1})])}}}))}}}));
