import{dG as d,dB as l,dF as f,dq as t,dx as r,dm as o}from"./index-D_pphaE2.js";import{F as u}from"./startCase-BsTKbnbP.js";import{F}from"./FeatureWrapper-DRy_rS6q.js";import{a as _}from"./index-BhIhHSRV.js";import"./envs-CRUy-_iG.js";import"./DisplayValue-Bn_kSwDb.js";import"./isObject--vsEa_js.js";import"./_createCompounder-DD7kMWdY.js";import"./isObjectLike-DDO0-ybB.js";function w({sourceIdx:s,device:a}){const{t:n}=d("common"),i=l(f(e=>e.deviceStates[s][a.friendly_name]??{})),p=t.useCallback(async e=>{await r(s,`${a.ieee_address}/set`,e)},[s,a.ieee_address]),m=t.useCallback(async e=>{await r(s,`${a.ieee_address}/get`,e)},[s,a.ieee_address]);return a.definition?.exposes?.length?o.jsx("div",{className:"list bg-base-100",children:a.definition.exposes.map(e=>o.jsx(u,{feature:e,device:a,deviceState:i,onChange:p,onRead:m,featureWrapperClass:F,parentFeatures:[]},_(e)))}):n(e=>e.empty_exposes_definition)}export{w as default};
