import{wt as e}from"./mui-B6lh3XSP.js";import{u as t}from"./IconButton-BEBOUWhl.js";import{t as n}from"./Container-CHg71Wor.js";import{i as r,n as i,r as a,t as o}from"./ExpandMore-BvigPYWL.js";import{t as s}from"./Typography-DfQXhGTT.js";import{n as c}from"./MenuItem-HQNtf0LG.js";import{n as l,q as u,yt as d}from"./index-KVuxnkWj.js";import{n as f,t as p}from"./useSettingsStyles-X3caKosH.js";import{t as m}from"./LinkField-DTqLoqLz.js";var h=e(),g=()=>{let{classes:e}=p(),g=d(),{id:_}=t(),v=l();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=>u(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};