import{u as l,a as f,I as u,r as t,s as r,j as o}from"./index-VJpwYvBU.js";import{F as d}from"./startCase-DNIChZAc.js";import{F as g}from"./FeatureWrapper-5iLBJB0_.js";import{g as _}from"./index-C1LTvZEM.js";import"./envs-CRUy-_iG.js";import"./DisplayValue-BX0bcoSg.js";import"./isObject--vsEa_js.js";import"./_createCompounder-JrZUBxnL.js";import"./isObjectLike-CKrHmw-v.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};
