import{dG as d,dB as l,dF as f,dq as t,dx as r,dm as o}from"./index-DjbVAZHL.js";import{F as u}from"./startCase-SXH8nyJo.js";import{F}from"./FeatureWrapper-DrakfNcb.js";import{a as _}from"./index-RfvTmd0Z.js";import"./envs-CRUy-_iG.js";import"./DisplayValue-e_yVQGok.js";import"./isObject--vsEa_js.js";import"./_createCompounder-CI5okWsL.js";import"./isObjectLike-DlSfHoCn.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};
