System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./data-legacy-B9xdUIE5.js?v=1773287522785","./php-legacy-BZUQ59eS.js?v=1773287522785","./useLoading-legacy-IiShPpjk.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785"],(function(t,e){"use strict";var a,s,o,l,r,n,i,c,u,d,p,m,f,b,g,y,v,x,_,S,k,$,h,C,P,j,w,N,R,L,q,z,B;return{setters:[t=>{a=t.t,s=t._,o=t.l,l=t.i,r=t.h,n=t.au,i=t.c},t=>{c=t.c},t=>{u=t.b,d=t.s},t=>{p=t.u},t=>{m=t.k,f=t.R,b=t.a6,g=t.r,y=t.c,v=t.$,x=t.a8,_=t.a9,S=t.a0,k=t.S,$=t.j,h=t.aa,C=t.Z,P=t.F,j=t.ak,w=t._,N=t.L},t=>{R=t.a5,L=t.a0,q=t.k,z=t.ax,B=t.B}],execute:function(){var e=document.createElement("style");e.textContent=".soft-btn.n-button--error-type[data-v-5600598b]{--n-color: rgba(239, 8, 8, .14);--n-color-hover: rgba(239, 8, 8, .14);--n-color-focus: rgba(239, 8, 8, .14);--n-color-pressed: rgba(239, 8, 8, .14);--n-border: 1px solid rgba(239, 8, 8, .19);--n-border-hover: 1px solid rgba(239, 8, 8, .19);--n-border-pressed: 1px solid rgba(239, 8, 8, .19);--n-border-focus: 1px solid rgba(239, 8, 8, .19);--n-text-color: #666;--n-text-color-pressed: #666;--n-text-color-focus: #666;--n-text-color-hover: #ef0808}\n/*$vite$:1*/",document.head.appendChild(e);const W={key:0,class:"i-material-symbols:network-node color-primary text-16px"},D={class:"m-2px"},E=m({__name:"index",props:{softName:{default:""},openSoft:{default:""},isWebSite:{type:Boolean,default:!1}},setup(t){const e=t,{t:i}=f(),{multiService:m}=b(a()),E=g({status:!0,s_status:!0,msg:"",version:"0",name:"",title:"",admin:!1,s_version:""}),F=y((()=>c(E.value.name)+" "+E.value.version)),{loading:I,setLoading:M}=p(),Z=async()=>{try{M(!0);const{message:t}=await u({name:e.softName});l(t)&&(E.value=t)}finally{M(!1)}},A=(t,e)=>{const a=`${e} ${F.value}`,s=i("Component.SoftState.index_1",[e.toLowerCase(),c(E.value.name)]);r({title:a,content:s,onConfirm:async()=>{await d({name:E.value.s_version,type:t}),Z()}})},G=()=>{n({name:e.openSoft?e.openSoft:e.softName,title:c(E.value.name),admin:!0})};return Z(),(t,e)=>{const a=z,l=o,r=B,n=s,c=L,u=q,d=R;return v(),x(d,{trigger:"hover"},{trigger:_((()=>[k(I)?(v(),x(a,{key:0,width:120,height:32,sharp:!1})):(v(),x(r,{key:1,class:"min-w-120px soft-btn",type:k(E).s_status?"default":"error",onClick:G},{default:_((()=>[t.isWebSite&&k(m)?(v(),C("i",W)):(v(),x(l,{key:1,name:`soft-${t.softName}`,size:"20"},null,8,["name"])),w("span",D,h(k(F)),1),w("span",{class:N(["text-14px",k(E).s_status?"i-mage:play-fill text-primary":"i-mage:pause-fill text-error"])},null,2)])),_:1},8,["type"]))])),default:_((()=>[S(u,{class:"items-center",size:8},{default:_((()=>[S(n,{onClick:e[0]||(e[0]=e=>A(k(E).s_status?"stop":"start",k(E).s_status?t.$t("Public.Status.Stop"):t.$t("Public.Status.Start")))},{default:_((()=>[$(h(k(E).s_status?t.$t("Public.Status.Stop"):t.$t("Public.Status.Start")),1)])),_:1}),S(c,{class:"mx-0!",vertical:""}),S(n,{onClick:e[1]||(e[1]=t=>A("restart",k(i)("Public.Status.Restart")))},{default:_((()=>[$(h(t.$t("Public.Status.Restart")),1)])),_:1}),S(c,{class:"mx-0!",vertical:""}),S(n,{onClick:e[2]||(e[2]=t=>A("reload",k(i)("Public.Status.Reload")))},{default:_((()=>[$(h(t.$t("Public.Status.Reload")),1)])),_:1}),"pgsql"!==t.softName?(v(),C(P,{key:0},[S(c,{class:"mx-0!",vertical:""}),S(n,{onClick:G},{default:_((()=>[$(h(t.$t("Database.Mysql.index_26")),1)])),_:1})],64)):j("",!0)])),_:1})])),_:1})}}});t("_",i(E,[["__scopeId","data-v-5600598b"]]))}}}));
