import{t as s,l as a,K as e,M as t,bo as o}from"./utils-lib.js?v=20260328163632";import{w as i}from"./useMethod5.js?v=20260328163632";import{ag as r}from"./site.js?v=20260328163632";import{u as l}from"./store4.js?v=20260328163632";import{k as m,r as n,c as p,o as u,l as v,Y as c,V as d,_ as j,U as f}from"./base-lib.js?v=20260328163632";import"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";import"./index92.js?v=20260328163632";import"./useMethod4.js?v=20260328163632";import"./index98.js?v=20260328163632";import"./index85.js?v=20260328163632";import"./index158.js?v=20260328163632";import"./ace.js?v=20260328163632";import"./index97.js?v=20260328163632";import"./index88.js?v=20260328163632";const x=m({__name:"index",props:{compData:{default:()=>[]}},setup(m,{expose:x}){const h=m,{isRefreshList:b}=l(),y=n(!1),P=n([]),_=p((()=>({label:a("PHP版本"),ruleKey:"version",rules:[e({message:a("请选择PHP版本")})],children:[{type:"select",key:"version",attrs:{class:"!w-240px",placeholder:a("请选择PHP版本"),options:P.value}}]}))),g=n({formAttrs:{labelWidth:"100px"},formItems:[]}),w=p((()=>(g.value.formItems=[_.value],g.value))),[H,D,M]=s(w);return u((()=>{(async()=>{var s;y.value=!0;const a=await i(!0,1);y.value=!1,P.value=a,D.value.version||(D.value.version=(null==(s=a[0])?void 0:s.value)||"")})()})),x({onConfirm:async s=>{await M.value.validate();const e=t.load(a("正在调整php版本，请稍后..."));let i=[];await Promise.all(h.compData.map((async(s,a)=>{try{const e=await r({siteid:s.id,version:D.value.version,reload:a===h.compData.length-1});i.push({name:null==s?void 0:s.name,msg:e.msg,status:e.status})}catch(e){}}))),e.close(),o(i,{title:a("设置php版本")}),s(),b.value=!0}}),(s,a)=>{const e=f("bt-loading");return v((d(),j(c(H),{class:"p-20px"},null,512)),[[e,c(y)]])}}});export{x as default};
