import{j as e,u as x,L as f,g as j,b as c}from"./index-fb4a4614.js";import{L as u,P as p}from"./index-662e592d.js";import{T as h}from"./DashboardFeatureWrapper-ef543cb2.js";import{D as N}from"./DeviceImage-a3fb91b8.js";const g=({device:t,deviceState:a,lastSeenType:s})=>{const{linkquality:l}=a,{supported:r}=t;return e.jsx("footer",{className:"card-footer pt-0",children:e.jsxs("div",{className:"row justify-content-between flex-nowrap",children:[e.jsx("div",{title:"last update",className:"col text-truncate",children:e.jsx(u,{state:a,lastSeenType:s})}),e.jsxs("div",{className:"col col-auto text-truncate",children:[e.jsxs("span",{className:"me-1",children:[e.jsx("i",{className:"fa fa-signal fa-fw"})," ",l," LQI"]},"linkquality"),r&&e.jsx(p,{device:t,deviceState:a},"power")]})]})})},D=g,b="_deviceImage_10iuz_1",w={deviceImage:b},y=({onChange:t,onRead:a,device:s,endpoint:l,deviceState:r,lastSeenType:i,feature:{features:n},featureWrapperClass:o,controls:d})=>{const{t:m}=x("zigbee");return e.jsx("div",{className:"col-xl-3 col-lg-4 col-sm-6 col-12 d-flex",children:e.jsxs("div",{className:"flex-fill card flex-shrink-1",children:[e.jsxs("div",{className:"card-header pb-0 d-flex justify-content-between",children:[e.jsxs(f,{to:j(s.ieee_address),children:[e.jsx(N,{disabled:!1,device:s,className:c(w.deviceImage,"me-2 d-inline")}),s.friendly_name,l?` (${m("endpoint")}: ${l})`:""]}),d]}),e.jsx("div",{className:"card-header py-0 d-flex justify-content-between",children:e.jsx("small",{children:s.description})}),e.jsx("div",{className:c("card-body align-items-center row"),children:e.jsx(h,{feature:{features:n},className:"row",type:"composite",device:s,deviceState:r,onChange:t,onRead:a,featureWrapperClass:o,minimal:!0})}),e.jsx(D,{device:s,deviceState:r,lastSeenType:i})]})})},_=y;export{_ as D};
