import{i as e}from"./chunk-aKtaBQYM.js";import{N as t,Rt as n,Vt as r,d as i,t as a,wt as o,zt as s}from"./mui-B6lh3XSP.js";import{l as c,t as l}from"./IconButton-BEBOUWhl.js";import{n as u}from"./MenuItem-HQNtf0LG.js";import{t as d}from"./TableHead-_KJlbpnj.js";import{At as f,Dt as p,Ot as m,jt as h,wt as g,yt as _}from"./index-KVuxnkWj.js";import{t as v}from"./ReportsMenu-XWwKkI0p.js";var y=e(r(),1),b=o(),x=t((0,b.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z`}),`CheckCircleOutlined`),S=t((0,b.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25`}),`HelpOutlined`),C=a()(e=>({columnAction:{width:`1%`,paddingLeft:e.spacing(1)}})),w=()=>{let{classes:e}=C(),t=c(),r=n(),a=_();(0,y.useEffect)(()=>(r(i.enableLogs(!0)),()=>r(i.enableLogs(!1))),[r]);let o=s(e=>e.session.logs),w=e=>{t(`/settings/device?${new URLSearchParams({uniqueId:e}).toString()}`)};return(0,b.jsx)(u,{menu:(0,b.jsx)(v,{}),breadcrumbs:[`reportTitle`,`sharedLogs`],children:(0,b.jsxs)(f,{children:[(0,b.jsx)(d,{children:(0,b.jsxs)(g,{children:[(0,b.jsx)(p,{className:e.columnAction}),(0,b.jsx)(p,{children:a(`deviceIdentifier`)}),(0,b.jsx)(p,{children:a(`positionProtocol`)}),(0,b.jsx)(p,{children:a(`commandData`)})]})}),(0,b.jsx)(m,{children:o.map((t,n)=>(0,b.jsxs)(g,{children:[(0,b.jsx)(p,{className:e.columnAction,padding:`none`,children:t.deviceId?(0,b.jsx)(l,{color:`success`,size:`small`,disabled:!0,children:(0,b.jsx)(x,{fontSize:`small`})}):(0,b.jsx)(h,{title:a(`loginRegister`),children:(0,b.jsx)(l,{color:`error`,size:`small`,onClick:()=>w(t.uniqueId),children:(0,b.jsx)(S,{fontSize:`small`})})})}),(0,b.jsx)(p,{children:t.uniqueId}),(0,b.jsx)(p,{children:t.protocol}),(0,b.jsx)(p,{children:t.data})]},n))})]})})};export{w as default};