import{_ as e}from"./index.js?v=1753954525509";import{e as a,_ as t}from"./public.js?v=1753954525509";import{u as s,cg as l,c as n,m as i,b_ as o,b as p,p as r,e as u}from"./page_layout.js?v=1753954525509";import{c as m}from"./soft.js?v=1753954525509";import{g as _}from"./soft2.js?v=1753954525509";import{_ as c}from"./index.vue_vue_type_script_setup_true_lang18.js?v=1753954525509";import{c3 as d,bY as v,cG as f,ay as x}from"./naive.js?v=1753954525509";import{k as h,P as j,r as y,X as g,U as w,V as b,Q as k,a2 as H,W as $,H as S,a3 as I,ah as P,a1 as C,j as T,al as U,m as W}from"./vue.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang4.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang7.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang14.js?v=1753954525509";import"./theme-chrome.js?v=1753954525509";import"./file2.js?v=1753954525509";const L={key:0,class:"p-30px"},M=["src"],N=["title"],q={class:"font-600 mt-30px"},G=["innerHTML"],O=u(h({__name:"index",props:{name:{},callback:{},hide:{}},setup(u){const{t:h}=j(),O=s(),Q=u,R=["nginx","apache","mysql","php"],V=e=>R.includes(e)||e.startsWith("php-"),X=y(),Y=y(""),z=y(),A=(e,a)=>{Y.value=a.ps},B=e=>W(d,{trigger:"hover",placement:"top-start"},{trigger:()=>W("span",e.label),default:()=>W("span",e.label)}),D=y(),E=async(e=1)=>{var a;if(D.value){const{message:t}=await l({sName:D.value.name,version:X.value,type:e});if(n(t)){if(t.result)return i.success(t.result),O.taskCount+=1,null==(a=Q.callback)||a.call(Q),Q.hide(),void o();await m({name:t.name,tmp_path:t.tmp_path,title:h("Soft.index_21")},(()=>{var e;null==(e=Q.callback)||e.call(Q)}))}Q.hide()}},F=()=>{J.show=!0},J=a(h("Home.Install.index_7"),{name:Q.name,callback:()=>{E(0)}});return(async()=>{const{message:e}=await p({sName:Q.name},!0);n(e)&&(D.value=e,z.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}})),X.value=z.value[0].value,Y.value=z.value[0].ps)})(),(a,s)=>{const l=v,n=f,i=x,o=r,p=t,u=e;return g(D)?(w(),b("div",L,[k(l,{class:"justify-between! items-center"},{default:H((()=>[k(l,{class:"items-center"},{default:H((()=>[$("img",{class:"w-40px",src:g(_)(g(D).name)},null,8,M),$("div",null,[$("p",{class:S(["font-600 text-18px max-w-290px",{"max-w-190px!":V(g(D).name)}]),title:"".concat(g(D).title," ").concat(g(X))},I(g(D).title)+" "+I(g(D).title.indexOf("PHP-")>-1?"":g(X)),11,N)])])),_:1}),k(l,null,{default:H((()=>[k(n,{class:"w-100px!",value:g(X),"onUpdate:value":[s[0]||(s[0]=e=>P(X)?X.value=e:null),A],options:g(z),"consistent-menu-width":!1,"render-label":B},null,8,["value","options"]),V(g(D).name)?(w(),C(i,{key:0,onClick:F},{default:H((()=>[T(I(a.$t("Home.Install.index_7")),1)])),_:1})):U("",!0),k(i,{type:"primary",onClick:s[1]||(s[1]=e=>E(1))},{default:H((()=>[T(I(V(g(D).name)?a.$t("Home.Install.index_5"):a.$t("Soft.index_34")),1)])),_:1})])),_:1}),k(o)])),_:1}),$("div",q,I(a.$t("Soft.index_39"))+"：",1),$("span",{class:"py-10px inline-block leading-20px color-#777777",innerHTML:g(Y)},null,8,G),k(p,null,{default:H((()=>[$("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}),k(u,{show:g(J).show,"onUpdate:show":s[2]||(s[2]=e=>g(J).show=e),title:g(J).title,data:g(J).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-ff9d47ce"]]);export{O as default};
