import{u as l,a as f,I as u,r as t,s as r,j as o}from"./index-a36IMXuN.js";import{F as d}from"./startCase-K7WbZvzP.js";import{F as g}from"./FeatureWrapper-BGeGFgyv.js";import{g as _}from"./index-CCf1BEwD.js";import"./envs-CRUy-_iG.js";import"./DisplayValue-D9Ja0Su_.js";import"./isObject--vsEa_js.js";import"./_createCompounder-BuXEc9F7.js";import"./isObjectLike-BQssIl0N.js";function w({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{w as default};
