import{u as l,a as u,D as f,r as t,s as r,j as n}from"./index-KAtljJVt.js";import{F as d,a as g}from"./Feature-B1aHJEJ-.js";import{g as _}from"./index-B-QDvwG_.js";import"./envs-CSqIi4cL.js";import"./DisplayValue-BbeFDe0l.js";import"./isObject--vsEa_js.js";import"./_createCompounder-CDGep--y.js";import"./isObjectLike-CdeenLLY.js";function S({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{S as default};
