import{s as e,o as s,u as t,a,b as n,c as o,d as i,_ as l,R as r}from"./tableColumns.js?v=1753954525509";import{cI as p,e as c,u,b_ as m,cJ as _,cK as d,c as f,x as v,o as g}from"./page_layout.js?v=1753954525509";import{a as x,b as y,h as k,K as h,L as b,M as w,N as S,O as j,m as C,d as $,c as R,P as H,f as I}from"./public.js?v=1753954525509";import{k as L,r as P,U,a1 as z,a2 as N,W as B,a3 as K,V as M,O,H as A,X as D,F as E,$ as F,Q as J,j as Q,al as T,P as V,w as W,N as X}from"./vue.js?v=1753954525509";import{bY as Y,ay as q,cD as G}from"./naive.js?v=1753954525509";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang4.js?v=1753954525509";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang5.js?v=1753954525509";import{u as se}from"./soft.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1753954525509";import"./soft2.js?v=1753954525509";import"./index.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang7.js?v=1753954525509";const te={class:"w-80px inline-block"},ae=["onClick"],ne=c(L({__name:"app-sort",setup(t){const a=p(),n=P(e.type);return(()=>{const s=Number(localStorage.getItem("soft-app"));s&&(n.value=s,e.type=s)})(),(t,o)=>{const i=Y;return U(),z(i,{class:"py-16px items-center"},{default:N((()=>[B("span",te,K(t.$t("Soft.index_7")),1),(U(!0),M(E,null,O(D(s),(s=>(U(),M("div",{class:A(["list",{active:D(n)===s.value}]),key:s.value,onClick:t=>{return o=s.value,n.value=o,e.p=1,e.type=o,localStorage.setItem("soft-app",o.toString()),void a.setRefresh(!0);var o}},K(s.label),11,ae)))),128))])),_:1})}}}),[["__scopeId","data-v-bea40fc8"]]),oe={key:0,class:"box"},ie={key:0,class:"mr-15px"},le={key:1,class:"mr-10px"},re=c(L({__name:"index",setup(e){const s=u(),{isPro:t,authExpired:a}=F(s);return(e,s)=>{const n=q;return"Lifetime"!==D(a)?(U(),M("div",oe,[D(t)?(U(),M("span",ie,K(e.$t("Soft.index_16",[D(a)])),1)):(U(),M("span",le,K(e.$t("Soft.index_17")),1)),J(n,{type:"primary",size:"small",onClick:s[0]||(s[0]=e=>{x({source:t.value?30:29})})},{default:N((()=>[Q(K(D(t)?e.$t("Soft.index_18"):e.$t("Home.index_22")),1)])),_:1})])):T("",!0)}}}),[["__scopeId","data-v-25ba4c48"]]),pe=L({__name:"index",setup(s){const{t:l}=V(),r=p(),c=u(),{keys:L,table:P,columns:B}=y([t(),{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=>J("span",{innerHTML:e.ps},null)},{key:"name",title:l("Soft.index_12"),width:"60",render:e=>"0.00"===e.price||0===e.price?J("span",null,[l("Soft.index_13")]):J("span",{class:"color-#fc6d26"},["$".concat(e.price)])},a(),n(),o(),i(),k({width:180,align:"right",options:e=>[{label:l("Home.index_5"),show:h(e),onClick:()=>{const s=b(e),t={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};w(t,(()=>{A()}))}},{label:l("Layout.Sider.mail_12"),show:e.setup&&!S(e),onClick:()=>{se(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}};x(s)}},{label:j(e),show:!e.setup&&!S(e),onClick:()=>{"1"===e.task?C(e.name,(()=>{A()})):m()}},{label:l("Public.Btn.Uninstall"),show:e.setup,onClick:()=>{$({title:l("Public.Btn.Uninstall"),content:l("Soft.index_15",[e.title,e.version]),onConfirm:async()=>{e.version=e.name.includes("php-")?e.versions[0].m_version:e.version,await _({sName:e.name,version:e.version}),A()}})}}]})]),{loading:M,setLoading:O}=R();W((()=>r.isRefresh),(e=>{e&&(r.setRefresh(!1),A())})),W((()=>c.taskCount),(e=>{e&&console.log(e),A()}));const A=async()=>{try{O(!0);const{message:s}=await d(X(e),!!e.force);f(s)&&(P.data=s.list.data,P.total=v(s.list.page))}finally{L.value=[],e.force=0,O(!1)}};return A(),(s,t)=>{const a=g,n=I,o=ee,i=Z;return U(),z(i,{class:"py-16px"},{table:N((()=>[J(n,{"row-key":"name",loading:D(M),data:D(P).data,columns:D(B)},{empty:N((()=>[J(a,{onClick:D(H)},{default:N((()=>[Q(K(s.$t("Soft.index_26")),1)])),_:1},8,["onClick"])])),_:1},8,["loading","data","columns"])])),pageRight:N((()=>[J(o,{page:D(e).p,"onUpdate:page":t[0]||(t[0]=s=>D(e).p=s),"page-size":D(e).row,"onUpdate:pageSize":t[1]||(t[1]=s=>D(e).row=s),"item-count":D(P).total,onRefresh:A},null,8,["page","page-size","item-count"])])),_:1})}}}),ce=L({__name:"index",setup:e=>(e,s)=>{const t=G;return U(),z(t,{class:"p-16px"},{default:N((()=>[J(l),J(r),J(ne),J(re),J(pe)])),_:1})}});export{ce as default};
