import{b as c,r as a,W as u,a as l,j as r}from"./index-BeDhuS24.js";import{F as m,a as x,g as f}from"./Feature-B18PTY7Z.js";import"./envs-DFlyG_dH.js";import"./DisplayValue-y4u-p3TF.js";import"./_createCompounder-HA4t3BbU.js";function F(o){const{device:e}=o,{t:i}=c(["exposes"]),{sendMessage:t}=a.useContext(u),n=l(s=>s.deviceStates[e.friendly_name]??{}),p=a.useCallback(async s=>{await t(`${e.ieee_address}/set`,s)},[t,e.ieee_address]),d=a.useCallback(async s=>{await t(`${e.ieee_address}/get`,s)},[t,e.ieee_address]);return e.definition?.exposes?.length?r.jsx("div",{className:"list bg-base-100",children:e.definition.exposes.map(s=>r.jsx(m,{feature:s,device:e,deviceState:n,onChange:p,onRead:d,featureWrapperClass:x,parentFeatures:[]},f(s)))}):i("empty_exposes_definition")}export{F as default};
