import{u as l,a as f,I as u,r as t,s as r,j as o}from"./index-B_eahVWI.js";import{F as d}from"./startCase-BlYkzI2K.js";import{F as g}from"./FeatureWrapper-CuGmNNoZ.js";import{g as _}from"./DisplayValue-8WlGubxH.js";import"./envs-CRUy-_iG.js";import"./isObject--vsEa_js.js";import"./_createCompounder-KpkcgNnL.js";import"./isObjectLike-mS1hgzH9.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};
