import{b as c,r as a,W as u,a as l,j as r}from"./index-DtyjNqrf.js";import{F as m,a as x,g as f}from"./Feature-VsMzzVJz.js";import"./envs-DFlyG_dH.js";import"./DisplayValue-B5Rw3jLu.js";import"./_createCompounder-CbLsIfEE.js";import"./capitalize-C89IAw35.js";function j(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{j as default};
