import{s as e,o as s,u as a,a as t,b as n,c as i,d as o,_ as l,R as r}from"./tableColumns.js?v=1764233927359";import{d0 as p,p as u,u as c,X as d,m,d1 as _,d2 as f,d as v,y as g,o as x}from"./page_layout.js?v=1764233927359";import{b as y,c as h,f as k,K as b,L as S,M as w,N as j,O as C,m as R,a as $,d as P,P as H,h as L}from"./public.js?v=1764233927359";import{k as U,r as z,a2 as I,V as N,a3 as B,S as M,R as O,a4 as A,O as E,H as F,U as K,F as T,a0 as V,an as W,W as X,j as Y,P as q,w as D,N as G}from"./vue.js?v=1764233927359";import{da as J,aC as Q,dS as Z}from"./naive.js?v=1764233927359";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang5.js?v=1764233927359";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang7.js?v=1764233927359";import{a as ae}from"./soft.js?v=1764233927359";import"./index.vue_vue_type_script_setup_true_lang8.js?v=1764233927359";import"./soft2.js?v=1764233927359";import"./index.js?v=1764233927359";import"./common.js?v=1764233927359";import"./__commonjsHelpers__.js?v=1764233927359";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1764233927359";import"./site.js?v=1764233927359";const te={class:"w-80px inline-block"},ne=["onClick"],ie=u(U({__name:"app-sort",setup(a){const t=p(),n=z(e.type);return(()=>{const s=Number(localStorage.getItem("soft-app"));s&&(n.value=s,e.type=s)})(),(a,i)=>{const o=J;return N(),I(o,{class:"py-16px items-center"},{default:B(()=>[M("span",te,A(a.$t("Soft.index_7")),1),(N(!0),O(T,null,E(K(s),s=>(N(),O("div",{class:F(["list",{active:K(n)===s.value}]),key:s.value,onClick:a=>{return i=s.value,n.value=i,e.p=1,e.type=i,localStorage.setItem("soft-app",i.toString()),void t.setRefresh(!0);var i}},A(s.label),11,ne))),128))]),_:1})}}}),[["__scopeId","data-v-f20307d1"]]),oe={key:0,class:"box appStore-pro-tips"},le={key:0,class:"mr-15px"},re={key:1,class:"mr-10px"},pe=u(U({__name:"index",setup(e){const s=c(),{isPro:a,authExpired:t}=V(s);return(e,s)=>{const n=Q;return"Lifetime"!==K(t)?(N(),O("div",oe,[K(a)?(N(),O("span",le,A(e.$t("Soft.index_16",[K(t)])),1)):(N(),O("span",re,A(e.$t("Soft.index_17")),1)),X(n,{type:"primary",size:"small",onClick:s[0]||(s[0]=e=>{y({source:a.value?30:29})})},{default:B(()=>[Y(A(K(a)?e.$t("Soft.index_18"):e.$t("Home.index_22")),1)]),_:1})])):W("",!0)}}}),[["__scopeId","data-v-c3090a2b"]]),ue=U({__name:"index",setup(s){const{t:l}=q(),r=p(),u=c(),{multiService:U}=V(u),{keys:z,table:M,columns:O}=h([a(),{key:"name",title:l("Soft.index_9"),width:"100",ellipsis:{tooltip:{width:"trigger"}},render:e=>e.author?e.author:l("Soft.index_11")},{key:"name",title:l("Soft.index_10"),ellipsis:{tooltip:{width:"trigger"}},render:e=>X("span",{innerHTML:e.ps},null)},{key:"name",title:l("Soft.index_12"),width:"60",render:e=>"0.00"===e.price||0===e.price?X("span",null,[l("Soft.index_13")]):X("span",{class:"color-#fc6d26"},["$".concat(e.price)])},t(),n(),i(),o(),k({width:180,align:"right",options:e=>[{label:l("Home.index_5"),show:b(e),onClick:()=>{const s=j(e),a={name:e.name,title:e.title,m_version:e.versions[s].m_version,version:e.versions[s].version,update_msg:e.versions[s].update_msg};C(a,()=>{T()})}},{label:l("Layout.Sider.mail_12"),show:e.setup&&!S(e),onClick:()=>{ae(e)}},{label:-1===e.endtime?l("Component.Auth.index_3"):l("Soft.index_18"),show:S(e),onClick:()=>{const s={source:-1===e.endtime?31:32,plugin:{name:e.title,pid:e.pid,type:e.type,plugin:!0,renew:e.endtime,ps:e.ps}};y(s)}},{label:w(e),show:!e.setup&&!S(e),onClick:()=>{"1"===e.task?R(e.name,()=>{T()}):d()}},{label:l("Public.Btn.Uninstall"),show:e.setup,onClick:()=>{U.value&&["nginx","apache","openlitespeed"].includes(e.name)?m.error("You cannot uninstall if multiple services are enabled. Please disable multiple services before uninstalling."):$({title:l("Public.Btn.Uninstall"),content:l("Soft.index_15",[e.title,e.version]),onConfirm:async()=>{const s=e.name.includes("nginx");e.version=e.name.includes("php-")?e.versions[0].m_version:e.version,await _({sName:e.name,version:s?"":e.version}),T()}})}}]})]),{loading:E,setLoading:F}=P();D(()=>r.isRefresh,e=>{e&&(r.setRefresh(!1),T())}),D(()=>u.taskCount,e=>{e&&console.log(e),T()});const T=async()=>{try{F(!0);const{message:s}=await f(G(e),!!e.force);v(s)&&(M.data=s.list.data,M.total=g(s.list.page))}finally{z.value=[],e.force=0,F(!1)}};return T(),(s,a)=>{const t=x,n=L,i=se,o=ee;return N(),I(o,{class:"py-16px"},{table:B(()=>[X(n,{"row-key":"name",loading:K(E),data:K(M).data,columns:K(O)},{empty:B(()=>[X(t,{onClick:K(H)},{default:B(()=>[Y(A(s.$t("Soft.index_26")),1)]),_:1},8,["onClick"])]),_:1},8,["loading","data","columns"])]),pageRight:B(()=>[X(i,{page:K(e).p,"onUpdate:page":a[0]||(a[0]=s=>K(e).p=s),"page-size":K(e).row,"onUpdate:pageSize":a[1]||(a[1]=s=>K(e).row=s),"item-count":K(M).total,onRefresh:T},null,8,["page","page-size","item-count"])]),_:1})}}}),ce=U({__name:"index",setup:e=>(e,s)=>{const a=Z;return N(),I(a,{class:"p-16px"},{default:B(()=>[X(l),X(r),X(ie),X(pe),X(ue)]),_:1})}});export{ce as default};
