import{u as l,a as u,E as f,r as t,s as r,j as n}from"./index-ClCsMWbS.js";import{F as d,a as g}from"./Feature-C2pFQwpi.js";import{g as _}from"./index-CQLnbJQy.js";import"./envs-CSqIi4cL.js";import"./DisplayValue-qZ7xyN8v.js";import"./isObject--vsEa_js.js";import"./_createCompounder-CDQ_1ElC.js";import"./isObjectLike-D4auEUP9.js";function E({sourceIdx:s,device:a}){const{t:o}=l("common"),i=u(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?n.jsx("div",{className:"list bg-base-100",children:a.definition.exposes.map(e=>n.jsx(d,{feature:e,device:a,deviceState:i,onChange:p,onRead:m,featureWrapperClass:g,parentFeatures:[]},_(e)))}):o(e=>e.empty_exposes_definition)}export{E as default};
