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