import{M as k}from"./MkPagination-DzUgufpZ.js";import{aA as y,b as i,c as b,d as C,_ as A}from"./app-QjDgb7aF.js";import{b as M,E as U,j as a,p as l,k as c,i as m,F as u,G as h,H as V,q as s,D as e,u as n,a as x}from"./vue-Cm77DuTi.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";const D={class:"_formRoot"},B={class:"_fullinfo"},I=["src"],N=["src"],j={class:"body"},E={class:"name"},F={class:"description"},P={class:"_keyValue"},T={class:"_keyValue"},$={class:"actions"},q=["onClick"],w=M({__name:"apps",setup(G){const d=x(null),v={endpoint:"i/apps",limit:100,params:{sort:"+lastUsedAt"}};function f(r){C("i/revoke-token",{tokenId:r.id}).then(()=>{d.value.reload()})}return y({title:i.ts.installedApps,icon:"ph-plug ph-bold ph-lg"}),(r,_)=>{const p=U("MkTime");return a(),l("div",D,[c(k,{ref_key:"list",ref:d,pagination:v},{empty:m(()=>[s("div",B,[s("img",{src:n(b).images.info,class:"_ghost",alt:"Info"},null,8,I),s("div",null,e(n(i).ts.nothing),1)])]),default:m(({items:g})=>[(a(!0),l(u,null,h(g,t=>(a(),l("div",{key:t.id,class:"_panel bfomjevm"},[t.iconUrl?(a(),l("img",{key:0,class:"icon",src:t.iconUrl,alt:""},null,8,N)):V("",!0),s("div",j,[s("div",E,e(t.name),1),s("div",F,e(t.description),1),s("div",P,[s("div",null,e(n(i).ts.installedDate)+":",1),s("div",null,[c(p,{time:t.createdAt},null,8,["time"])])]),s("div",T,[s("div",null,e(n(i).ts.lastUsedDate)+":",1),s("div",null,[c(p,{time:t.lastUsedAt},null,8,["time"])])]),s("div",$,[s("button",{class:"_button",onClick:o=>f(t)},[..._[0]||(_[0]=[s("i",{class:"ph-trash ph-bold ph-lg"},null,-1)])],8,q)]),s("details",null,[s("summary",null,e(n(i).ts.details),1),s("ul",null,[(a(!0),l(u,null,h(t.permission,o=>(a(),l("li",{key:o},e(n(i).t(`_permissions.${o}`)),1))),128))])])])]))),128))]),_:1},512)])}}}),J=A(w,[["__scopeId","data-v-1226098c"]]);export{J as default};
//# sourceMappingURL=apps-BQFcqUAR.js.map
