import{_ as e}from"./index.js?v=1763625242172";import{e as a,_ as t}from"./public.js?v=1763625242172";import{u as s,W as l,c as n,m as i,X as o,b as p,q as r,p as m}from"./page_layout.js?v=1763625242172";import{u}from"./soft.js?v=1763625242172";import{g as _}from"./soft2.js?v=1763625242172";import{_ as c}from"./index.vue_vue_type_script_setup_true_lang4.js?v=1763625242172";import{dh as d,d9 as v,dV as f,aC as x}from"./naive.js?v=1763625242172";import{k as j,P as h,r as w,V as y,R as g,S as b,X as k,a3 as H,U as $,H as S,a4 as C,aj as I,a2 as P,j as T,an as U,m as W}from"./vue.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./site.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang5.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import"./index100.js?v=1763625242172";import"./theme-monokai.js?v=1763625242172";import"./file.js?v=1763625242172";const q={key:0,class:"p-30px"},L=["src"],M=["title"],N={class:"font-600 mt-30px"},R=["innerHTML"],V=m(j({__name:"index",props:{name:{},callback:{},hide:{}},setup(m){const{t:j}=h(),V=s(),X=m,O=["nginx","apache","mysql","php"],z=e=>O.includes(e)||e.startsWith("php-"),A=w(),B=w(""),D=w(),E=(e,a)=>{B.value=a.ps},F=e=>W(d,{trigger:"hover",placement:"top-start"},{trigger:()=>W("span",e.label),default:()=>W("span",e.label)}),G=w(),J=async(e=1)=>{var a;if(G.value){const{message:t}=await l({sName:G.value.name,version:A.value,type:e});if(n(t)){if(t.result)return i.success(t.result),V.taskCount+=1,null==(a=X.callback)||a.call(X),X.hide(),void o();await u({name:t.name,tmp_path:t.tmp_path,title:j("Soft.index_21")},(()=>{var e;null==(e=X.callback)||e.call(X)}))}X.hide()}},K=()=>{Q.show=!0},Q=a(j("Home.Install.index_7"),{name:X.name,callback:()=>{J(0)}});return(async()=>{const{message:e}=await p({sName:X.name},!0);n(e)&&(G.value=e,D.value=e.versions.map((a=>{const t=a.m_version+"."+a.version;return{label:5===e.type?a.m_version:t||a.m_version,value:5===e.type?a.m_version:t||a.m_version,ps:a.update_msg}})),A.value=D.value[0].value,B.value=D.value[0].ps)})(),(a,s)=>{const l=v,n=f,i=x,o=r,p=t,m=e;return y(G)?(g(),b("div",q,[k(l,{class:"justify-between! items-center"},{default:H((()=>[k(l,{class:"items-center"},{default:H((()=>[$("img",{class:"w-40px",src:y(_)(y(G).name)},null,8,L),$("div",null,[$("p",{class:S(["font-600 text-18px max-w-290px",{"max-w-190px!":z(y(G).name)}]),title:"".concat(y(G).title," ").concat(y(A))},C(y(G).title)+" "+C(y(G).title.indexOf("PHP-")>-1?"":y(A)),11,M)])])),_:1}),k(l,null,{default:H((()=>[k(n,{class:"w-100px!",value:y(A),"onUpdate:value":[s[0]||(s[0]=e=>I(A)?A.value=e:null),E],options:y(D),"consistent-menu-width":!1,"render-label":F},null,8,["value","options"]),z(y(G).name)?(g(),P(i,{key:0,onClick:K},{default:H((()=>[T(C(a.$t("Home.Install.index_7")),1)])),_:1})):U("",!0),k(i,{type:"primary",onClick:s[1]||(s[1]=e=>J(1))},{default:H((()=>[T(C(z(y(G).name)?a.$t("Home.Install.index_5"):a.$t("Soft.index_34")),1)])),_:1})])),_:1}),k(o)])),_:1}),$("div",N,C(a.$t("Soft.index_39"))+"：",1),$("span",{class:"py-10px inline-block leading-20px text-font2",innerHTML:y(B)},null,8,R),k(p,null,{default:H((()=>[$("li",null,C(a.$t("Soft.index_35")),1),$("li",null,C(a.$t("Soft.index_36")),1),$("li",null,C(a.$t("Soft.index_37")),1)])),_:1}),k(m,{show:y(Q).show,"onUpdate:show":s[2]||(s[2]=e=>y(Q).show=e),title:y(Q).title,data:y(Q).data,width:480,footer:!0,"confirm-text":a.$t("WP.TableRow.index_13"),component:c},null,8,["show","title","data","confirm-text"])])):U("",!0)}}}),[["__scopeId","data-v-1fde51e5"]]);export{V as default};
