import{_ as U}from"./index.vue_vue_type_script_setup_true_lang-D2Bk83Ev.js?v=1773287522785";import{a3 as $,au as B,cz as j,n as q,c as F,a as R,cu as C,w as I,aJ as M,l as V,cA as z,cB as O}from"./index-BTglIPU2.js?v=1773287522785";import{a4 as T,r as N,e as P,k as D,b as A,$ as c,a8 as g,a9 as m,a0 as t,_ as d,aa as _,S as u,j as f,ak as E,Z as v,P as H,F as J}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{k as L,B as Z,ax as G}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{g as b}from"./soft-Cjyfamvm.js?v=1773287522785";import{u as K}from"./useLoading-CZ2gSAW7.js?v=1773287522785";import{j as Q}from"./useTableColumns-DDeyYvje.js?v=1773287522785";const W=T("soft",()=>{const n=N(!1);return{isRefresh:n,setRefresh:a=>{n.value=a}}}),{t:i}=$.global,r=P({p:1,row:20,query:"",type:0,tojs:"soft.get_list",force:0}),ue=P([{label:i("Crontab.Script.index_25"),value:0},{label:i("Mail.Setting.index_7"),value:-1},{label:i("Soft.index_1"),value:5},{label:i("Database.index_22"),value:6},{label:i("Soft.index_2"),value:7},{label:i("Soft.index_3"),value:8}]),X={class:"w-80px! inline-block"},pe=D({__name:"app-seach",setup(n){const e=W(),a=()=>{r.p=1,e.setRefresh(!0)},x=()=>{r.force=1,e.setRefresh(!0)};return A(()=>{r.p=1,r.query=""}),(l,h)=>{const o=U,y=L,S=Z;return c(),g(y,{class:"py-16px justify-between!"},{default:m(()=>[t(y,{class:"items-center"},{default:m(()=>[d("span",X,_(l.$t("Soft.index_4")),1),t(o,{clearable:"",class:"w-580px!",value:u(r).query,"onUpdate:value":h[0]||(h[0]=k=>u(r).query=k),placeholder:l.$t("Soft.index_5"),onSearch:a},null,8,["value","placeholder"])]),_:1}),t(S,{onClick:x},{default:m(()=>[f(_(l.$t("Soft.index_6")),1)]),_:1})]),_:1})}}}),Y={class:"w-80px inline-block"},w=["onClick"],ee=["src"],te=D({__name:"recently-used",setup(n){const e=N(),a=o=>{B(o)},{loading:x,setLoading:l}=K();return(async()=>{try{l(!0);const{message:o}=await j();q(o)&&(e.value=o)}finally{l(!1)}})(),(o,y)=>{const S=G,k=L;return c(),g(k,{class:"items-center h-42px"},{default:m(()=>[d("span",Y,_(o.$t("Soft.index_8")),1),u(x)?(c(),g(S,{key:0,width:800,sharp:!1,size:"medium"})):E("",!0),(c(!0),v(J,null,H(u(e),p=>(c(),v("div",{class:"list",key:p.id,onClick:ne=>a(p)},[d("img",{class:"w-22px mr-5px",src:u(b)(p.name)},null,8,ee),d("span",null,_(p.title),1)],8,w))),128))]),_:1})}}}),me=F(te,[["__scopeId","data-v-19dccd64"]]),{t:s}=$.global,de=()=>({key:"softwareName",title:s("Soft.index_29"),width:"220",ellipsis:{tooltip:{width:"trigger"}},render:e=>e.custom?t("span",{class:"cursor-pointer flex items-center",onClick:()=>R.push(e.route)},[t("img",{class:"w-22px max-h-22px mr-5px",src:b(e.name)},null),e.title]):t("span",{class:e.setup&&!C(e)?"cursor-pointer":"",onClick:e.setup&&!C(e)?()=>B(e):void 0},[t("img",{class:"w-22px max-h-22px mr-5px",src:b(e.name)},null),e.title,f(" "),e.title.indexOf("PHP-")>-1?"":e.version])}),_e=()=>({key:"name",title:s("Soft.index_14"),width:"100",render:e=>{if(e.pid>0){if(e.endtime>0)return I(e.endtime,"yyyy-MM-dd");if(e.endtime===0)return s("Soft.index_27");if(e.endtime===-1)return s("Soft.index_28");if(e.endtime===-2)return s("Site.PHP.index_28")}return"--"}}),fe=()=>({key:"location",title:s("Database.index_19"),width:"80",render:e=>e.setup?t(V,{name:"base-dir",class:"cursor-pointer",size:"16",onClick:()=>{M("Path",e.uninsatll_checks),R.push("/files")}},null):"---"}),xe=()=>({key:"status",title:s("Component.UploadFile.index_5"),width:"80",render:e=>{if(e.type!==5)return t("span",null,[f("--")]);const a=e.name==="phpmyadmin"?!0:e.status;return e.setup?t("span",{class:"text-14px ".concat(a?"i-mage:play-fill text-primary":"i-mage:pause-fill text-error")},null):t("span",null,[f("--")])}}),he=()=>({key:"displayOnDashboard",title:s("Soft.index_30"),width:"80",render:e=>e.setup?t(Q,{value:e.index_display,onClick:a=>{a?z({sName:e.name}):O({sName:e.name})}},null):"---"}),ye=()=>({key:"name",title:s("Soft.index_31"),width:"80",render:e=>e.sort?e.sort<=0||e.sort>5?s("Soft.index_32"):e.sort.toFixed(1):"--"});export{me as R,pe as _,de as a,_e as b,fe as c,xe as d,he as e,ye as f,ue as o,r as s,W as u};