import{i as e}from"./chunk-aKtaBQYM.js";import{O as t,Vt as n,t as r,wt as i,zt as a}from"./mui-B6lh3XSP.js";import{l as o,t as s,u as c}from"./IconButton-BEBOUWhl.js";import{t as l}from"./Container-CHg71Wor.js";import{t as u}from"./Typography-DfQXhGTT.js";import{t as d}from"./AppBar-DnD8yI_W.js";import{t as f}from"./TableHead-_KJlbpnj.js";import{At as p,Dt as m,Ot as h,Tt as g,pt as _,w as v,wt as y}from"./index-KVuxnkWj.js";import{t as b}from"./BackIcon-BjuxlqVJ.js";var x=e(n(),1),S=i(),C=r()(e=>({root:{height:`100%`,display:`flex`,flexDirection:`column`},content:{overflow:`auto`,paddingTop:e.spacing(2),paddingBottom:e.spacing(2),display:`flex`,flexDirection:`column`,gap:e.spacing(2)}})),w=()=>{let{classes:e}=C(),n=o(),{positionId:r}=c(),[i,w]=(0,x.useState)({});_(async({signal:e})=>{if(r){let t=await(await v(`/api/positions?id=${r}`,{signal:e})).json();t.length>0&&w(t[0])}},[r]);let T=a(e=>{if(i){let t=e.devices.items[i.deviceId];if(t)return t.name}return null});return(0,S.jsxs)(`div`,{className:e.root,children:[(0,S.jsx)(d,{position:`sticky`,color:`inherit`,children:(0,S.jsxs)(g,{children:[(0,S.jsx)(s,{color:`inherit`,edge:`start`,sx:{mr:2},onClick:()=>n(-1),children:(0,S.jsx)(b,{})}),(0,S.jsx)(u,{variant:`h6`,children:T})]})}),(0,S.jsxs)(`div`,{className:e.content,children:[(0,S.jsx)(l,{maxWidth:`sm`,children:(0,S.jsx)(t,{children:(0,S.jsxs)(p,{children:[(0,S.jsx)(f,{children:(0,S.jsxs)(y,{children:[(0,S.jsx)(m,{children:`MCC`}),(0,S.jsx)(m,{children:`MNC`}),(0,S.jsx)(m,{children:`LAC`}),(0,S.jsx)(m,{children:`CID`})]})}),(0,S.jsx)(h,{children:(i.network?.cellTowers||[]).map(e=>(0,S.jsxs)(y,{children:[(0,S.jsx)(m,{children:e.mobileCountryCode}),(0,S.jsx)(m,{children:e.mobileNetworkCode}),(0,S.jsx)(m,{children:e.locationAreaCode}),(0,S.jsx)(m,{children:e.cellId})]},e.cellId))})]})})}),(0,S.jsx)(l,{maxWidth:`sm`,children:(0,S.jsx)(t,{children:(0,S.jsxs)(p,{children:[(0,S.jsx)(f,{children:(0,S.jsxs)(y,{children:[(0,S.jsx)(m,{children:`MAC`}),(0,S.jsx)(m,{children:`RSSI`})]})}),(0,S.jsx)(h,{children:(i.network?.wifiAccessPoints||[]).map(e=>(0,S.jsxs)(y,{children:[(0,S.jsx)(m,{children:e.macAddress}),(0,S.jsx)(m,{children:e.signalStrength})]},e.macAddress))})]})})})]})]})};export{w as default};