import{i as e}from"./chunk-aKtaBQYM.js";import{Ft as t,vt as n}from"./mui-BgU4WrXF.js";import{t as r}from"./EditAttributesAccordion-J3XCwwrK.js";import{i,n as a,r as o,t as s}from"./ExpandMore-D0ycvrdR.js";import{t as c}from"./Typography-7EcQ2i3p.js";import{t as l}from"./TextField-DctlzLY-.js";import{pt as u}from"./index-bel1r0Sr.js";import{n as d,t as f}from"./useSettingsStyles-Bugi6oTj.js";import{t as p}from"./EditItemView-BPUZddYO.js";var m=e(t(),1),h=n(),g=()=>{let{classes:e}=f(),t=u(),[n,g]=(0,m.useState)();return(0,h.jsx)(p,{endpoint:`drivers`,item:n,setItem:g,validate:()=>n&&n.name&&n.uniqueId,menu:(0,h.jsx)(d,{}),breadcrumbs:[`settingsTitle`,`sharedDriver`],children:n&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(i,{defaultExpanded:!0,children:[(0,h.jsx)(a,{expandIcon:(0,h.jsx)(s,{}),children:(0,h.jsx)(c,{variant:`subtitle1`,children:t(`sharedRequired`)})}),(0,h.jsxs)(o,{className:e.details,children:[(0,h.jsx)(l,{value:n.name||``,onChange:e=>g({...n,name:e.target.value}),label:t(`sharedName`)}),(0,h.jsx)(l,{value:n.uniqueId||``,onChange:e=>g({...n,uniqueId:e.target.value}),label:t(`deviceIdentifier`)})]})]}),(0,h.jsx)(r,{attributes:n.attributes,setAttributes:e=>g({...n,attributes:e}),definitions:{}})]})})};export{g as default};