import{b as l,r as a,W as m,a as x,j as i}from"./index-vDL8KyrI.js";import{F as f,a as g,g as _}from"./Feature-Dn8iv4tk.js";import"./DisplayValue-CvjefE6V.js";import"./_createCompounder-Bmfmbzn9.js";import"./capitalize-Cw1mPDhM.js";function v(n){var r,o;const{device:e}=n,{t:p}=l(["exposes"]),{sendMessage:t}=a.useContext(m),d=x(s=>s.deviceStates[e.friendly_name]??{}),c=a.useCallback(async s=>{await t(`${e.ieee_address}/set`,s)},[t,e.ieee_address]),u=a.useCallback(async s=>{await t(`${e.ieee_address}/get`,s)},[t,e.ieee_address]);return(o=(r=e.definition)==null?void 0:r.exposes)!=null&&o.length?i.jsx("div",{className:"list bg-base-100",children:e.definition.exposes.map(s=>i.jsx(f,{feature:s,device:e,deviceState:d,onChange:c,onRead:u,featureWrapperClass:g,parentFeatures:[]},_(s)))}):p("empty_exposes_definition")}export{v as default};
