import{u as l,a as f,I as u,r as t,s as r,j as o}from"./index-CE-9RlbR.js";import{F as d}from"./startCase-BwzMWzGM.js";import{F as g}from"./FeatureWrapper-CyVtzJVN.js";import{g as _}from"./DisplayValue-eLtXORWe.js";import"./envs-CRUy-_iG.js";import"./isObject--vsEa_js.js";import"./_createCompounder-pwnXEtry.js";import"./isObjectLike-BsEMHB57.js";function S({sourceIdx:a,device:s}){const{t:n}=l("common"),i=f(u(e=>e.deviceStates[a][s.friendly_name]??{})),p=t.useCallback(async e=>{await r(a,`${s.ieee_address}/set`,e)},[a,s.ieee_address]),m=t.useCallback(async e=>{await r(a,`${s.ieee_address}/get`,e)},[a,s.ieee_address]);return s.definition?.exposes?.length?o.jsx("div",{className:"list bg-base-100",children:s.definition.exposes.map(e=>o.jsx(d,{feature:e,device:s,deviceState:i,onChange:p,onRead:m,featureWrapperClass:g,parentFeatures:[]},_(e)))}):n(e=>e.empty_exposes_definition)}export{S as default};
