import{b as c,a as d,r,W as f,j as o}from"./index-vDL8KyrI.js";import{F as g,a as m,g as l}from"./Feature-Dn8iv4tk.js";import"./DisplayValue-CvjefE6V.js";import"./_createCompounder-Bmfmbzn9.js";import"./capitalize-Cw1mPDhM.js";function _({device:e}){var a,i;const{t:n}=c(["exposes"]),p=d(s=>s.bridgeInfo),{sendMessage:t}=r.useContext(f),u=r.useCallback(async s=>{await t("bridge/request/device/options",{id:e.ieee_address,options:s})},[t,e.ieee_address]);return(i=(a=e.definition)==null?void 0:a.options)!=null&&i.length?o.jsx("div",{className:"list bg-base-100",children:e.definition.options.map(s=>o.jsx(g,{feature:s,device:e,deviceState:p.config.devices[e.ieee_address]??{},onChange:u,featureWrapperClass:m,parentFeatures:[]},l(s)))}):n("empty_exposes_definition")}export{_ as default};
