import{i as e}from"./chunk-aKtaBQYM.js";import{E as t,Ft as n,Nt as r,t as i,vt as a}from"./mui-BgU4WrXF.js";import{l as o,t as s,u as c}from"./IconButton-oialqkv3.js";import{t as l}from"./Container-fY8-hTkD.js";import{t as u}from"./Typography-7EcQ2i3p.js";import{t as d}from"./AppBar-BDMWinc3.js";import{t as f}from"./TableHead-DZPVxfXH.js";import{St as p,st as m,vt as h,w as g,wt as _,xt as v,yt as y}from"./index-bel1r0Sr.js";import{t as b}from"./BackIcon-CSBDQ_HZ.js";var x=e(n(),1),S=a(),C=i()(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:i}=c(),[a,w]=(0,x.useState)({});m(async({signal:e})=>{if(i){let t=await(await g(`/api/positions?id=${i}`,{signal:e})).json();t.length>0&&w(t[0])}},[i]);let T=r(e=>{if(a){let t=e.devices.items[a.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)(y,{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)(_,{children:[(0,S.jsx)(f,{children:(0,S.jsxs)(h,{children:[(0,S.jsx)(v,{children:`MCC`}),(0,S.jsx)(v,{children:`MNC`}),(0,S.jsx)(v,{children:`LAC`}),(0,S.jsx)(v,{children:`CID`})]})}),(0,S.jsx)(p,{children:(a.network?.cellTowers||[]).map(e=>(0,S.jsxs)(h,{children:[(0,S.jsx)(v,{children:e.mobileCountryCode}),(0,S.jsx)(v,{children:e.mobileNetworkCode}),(0,S.jsx)(v,{children:e.locationAreaCode}),(0,S.jsx)(v,{children:e.cellId})]},e.cellId))})]})})}),(0,S.jsx)(l,{maxWidth:`sm`,children:(0,S.jsx)(t,{children:(0,S.jsxs)(_,{children:[(0,S.jsx)(f,{children:(0,S.jsxs)(h,{children:[(0,S.jsx)(v,{children:`MAC`}),(0,S.jsx)(v,{children:`RSSI`})]})}),(0,S.jsx)(p,{children:(a.network?.wifiAccessPoints||[]).map(e=>(0,S.jsxs)(h,{children:[(0,S.jsx)(v,{children:e.macAddress}),(0,S.jsx)(v,{children:e.signalStrength})]},e.macAddress))})]})})})]})]})};export{w as default};