import{aP as o,ao as e,aQ as N,L as h,aq as r,ba as j,f,e as v}from"./app-k0jcl5PQ.js";import{f as A}from"./BojVbZw0.chunk.js";var s=(a=>(a[a.Inactive=0]="Inactive",a[a.Active=1]="Active",a[a.Updating=2]="Updating",a))(s||{});const I="_status_1e415_1",b={status:I},T="0001-01-01T00:00:00Z",t="settings.localCacheItem",l=h.encloseNamespace(t),E={[s.Inactive]:"offline",[s.Active]:"online",[s.Updating]:"updating"};function L(a,i){return i===s.Active?l("justNow"):!a||a===T?l("never"):A(a)}function y(a){const{localCache:i,canManage:d,minimal:c}=a,{status:n,deviceName:m,deviceId:p,lastSeen:g}=i,x=n===s.Inactive?o.LocalCache.OFFLINE:o.LocalCache.ONLINE,u=n===s.Active?"bg-green":"bg-gray";return e.jsxs("div",{className:`border rounded text-center ${c?"py-3":""}`,children:[!c&&e.jsx("div",{className:"my-2 overflow-hidden",children:e.jsx("h2",{className:"h6 text-truncate",children:m})}),e.jsx("img",{src:x,className:"img-fluid"}),e.jsxs("div",{className:"pt-2 align-middle",children:[e.jsx("span",{className:`${b.status} ${u} d-inline-block rounded-circle align-middle me-1`}),e.jsx("span",{className:"align-middle",children:e.jsx(N,{spanHack:!0,title:l("lastSeen",{time:L(g,n)}),spanHackClassName:"",children:e.jsx(r,{namespace:t,phrase:E[n]})})})]}),!c&&(d?e.jsx(j,{appLink:{application:v.SETTINGS,action:f.Settings.LOCAL_CACHE,args:[p]},className:"btn btn-link text-info mb-1",children:e.jsx(r,{namespace:t,phrase:"canManage"})}):e.jsx("div",{className:"btn text-secondary text-secondary mb-1",children:e.jsx(r,{namespace:t,phrase:"cantManage"})}))]})}export{y as L,s as a};
//# sourceMappingURL=N1H32_hG.chunk.js.map
