import{M as t,c as a,h as s,_ as e,o,p as n,e as l}from"./page_layout.js?v=1753954525509";import{c as i,d as c}from"./public.js?v=1753954525509";import{g as u,s as r}from"./php.js?v=1753954525509";import{u as m}from"./soft.js?v=1753954525509";import{ay as p,bY as f,c3 as d}from"./naive.js?v=1753954525509";import{k as _,P as v,r as S,c as b,U as y,a1 as g,a2 as x,X as P,Q as k,W as C,a3 as h,H as j,j as $}from"./vue.js?v=1753954525509";const w={class:"m-2px"},N=l(_({__name:"index",props:{softName:{default:""},openSoft:{default:""}},setup(l){const _=l,{t:N}=v(),R=S({status:!0,s_status:!0,msg:"",version:"0",name:"",title:"",admin:!1,s_version:""}),z=b((()=>t(R.value.name)+" "+R.value.version)),{loading:L,setLoading:M}=i(),q=async()=>{try{M(!0);const{message:t}=await u({name:_.softName});a(t)&&(R.value=t)}finally{M(!1)}},D=(a,s)=>{const e="".concat(s," ").concat(z.value),o=N("Component.SoftState.index_1",[s.toLowerCase(),t(R.value.name)]);c({title:e,content:o,onConfirm:async()=>{await r({name:R.value.s_version,type:a}),q()}})},H=()=>{m({name:_.openSoft?_.openSoft:_.softName,title:t(R.value.name),admin:!1})};return q(),(t,a)=>{const l=s,i=e,c=p,u=o,r=n,m=f,_=d;return y(),g(_,{trigger:"hover"},{trigger:x((()=>[P(L)?(y(),g(l,{key:0,width:120,height:32,sharp:!1})):(y(),g(c,{key:1,class:"min-w-120px soft-btn",type:P(R).s_status?"default":"error",onClick:H},{default:x((()=>[k(i,{name:"soft-".concat(t.softName),size:"20"},null,8,["name"]),C("span",w,h(P(z)),1),C("span",{class:j(["iconfont","icon-".concat(P(R).s_status?"start":"stop")])},null,2)])),_:1},8,["type"]))])),default:x((()=>[k(m,{class:"items-center",size:8},{default:x((()=>[k(u,{onClick:a[0]||(a[0]=a=>D(P(R).s_status?"stop":"start",P(R).s_status?t.$t("Public.Status.Stop"):t.$t("Public.Status.Start")))},{default:x((()=>[$(h(P(R).s_status?t.$t("Public.Status.Stop"):t.$t("Public.Status.Start")),1)])),_:1}),k(r,{class:"mx-0!",vertical:""}),k(u,{onClick:a[1]||(a[1]=t=>D("restart",P(N)("Public.Status.Restart")))},{default:x((()=>[$(h(t.$t("Public.Status.Restart")),1)])),_:1}),k(r,{class:"mx-0!",vertical:""}),k(u,{onClick:a[2]||(a[2]=t=>D("reload",P(N)("Public.Status.Reload")))},{default:x((()=>[$(h(t.$t("Public.Status.Reload")),1)])),_:1}),k(r,{class:"mx-0!",vertical:""}),k(u,{onClick:H},{default:x((()=>[$(h(t.$t("Database.Mysql.index_26")),1)])),_:1})])),_:1})])),_:1})}}}),[["__scopeId","data-v-155ce671"]]);export{N as _};
