import{vt as e}from"./mui-BgU4WrXF.js";import{u as t}from"./IconButton-oialqkv3.js";import{t as n}from"./Container-fY8-hTkD.js";import{i as r,n as i,r as a,t as o}from"./ExpandMore-D0ycvrdR.js";import{t as s}from"./Typography-7EcQ2i3p.js";import{n as c}from"./MenuItem-BNgF7Xqv.js";import{V as l,n as u,pt as d}from"./index-bel1r0Sr.js";import{n as f,t as p}from"./useSettingsStyles-Bugi6oTj.js";import{t as m}from"./LinkField-BMd_-lGk.js";var h=e(),g=()=>{let{classes:e}=p(),g=d(),{id:_}=t(),v=u();return(0,h.jsx)(c,{menu:(0,h.jsx)(f,{}),breadcrumbs:[`settingsTitle`,`sharedDevice`,`sharedConnections`],children:(0,h.jsx)(n,{maxWidth:`xs`,className:e.container,children:(0,h.jsxs)(r,{defaultExpanded:!0,children:[(0,h.jsx)(i,{expandIcon:(0,h.jsx)(o,{}),children:(0,h.jsx)(s,{variant:`subtitle1`,children:g(`sharedConnections`)})}),(0,h.jsxs)(a,{className:e.details,children:[(0,h.jsx)(m,{endpointAll:`/api/devices`,endpointLinked:`/api/devices?deviceId=${_}`,baseId:_,keyBase:`deviceId`,keyLink:`linkedDeviceId`,label:g(`deviceTitle`)}),(0,h.jsx)(m,{endpointAll:`/api/geofences`,endpointLinked:`/api/geofences?deviceId=${_}`,baseId:_,keyBase:`deviceId`,keyLink:`geofenceId`,label:g(`sharedGeofences`)}),(0,h.jsx)(m,{endpointAll:`/api/notifications`,endpointLinked:`/api/notifications?deviceId=${_}`,baseId:_,keyBase:`deviceId`,keyLink:`notificationId`,titleGetter:e=>l(g,e),label:g(`sharedNotifications`)}),!v.disableDrivers&&(0,h.jsx)(m,{endpointAll:`/api/drivers`,endpointLinked:`/api/drivers?deviceId=${_}`,baseId:_,keyBase:`deviceId`,keyLink:`driverId`,titleGetter:e=>`${e.name} (${e.uniqueId})`,label:g(`sharedDrivers`)}),!v.disableComputedAttributes&&(0,h.jsx)(m,{endpointAll:`/api/attributes/computed`,endpointLinked:`/api/attributes/computed?deviceId=${_}`,baseId:_,keyBase:`deviceId`,keyLink:`attributeId`,titleGetter:e=>e.description,label:g(`sharedComputedAttributes`)}),!v.disableSavedCommands&&(0,h.jsx)(m,{endpointAll:`/api/commands`,endpointLinked:`/api/commands?deviceId=${_}`,baseId:_,keyBase:`deviceId`,keyLink:`commandId`,titleGetter:e=>e.description,label:g(`sharedSavedCommands`)}),!v.disableMaintenance&&(0,h.jsx)(m,{endpointAll:`/api/maintenance`,endpointLinked:`/api/maintenance?deviceId=${_}`,baseId:_,keyBase:`deviceId`,keyLink:`maintenanceId`,label:g(`sharedMaintenance`)})]})]})})})};export{g as default};