UNPKG

@hakit/components

Version:
46 lines (45 loc) 1.52 kB
import { j as o } from "../../../../../emotion-react-jsx-runtime.browser.esm-Tq_btErF.js"; import "../../../../ThemeProvider/breakpoints.js"; import "react"; import { useEntity as a, isUnavailableState as s, ON as l } from "@hakit/core"; import "../../../Form/TextField.js"; import { f as c, X as f } from "../../../../../ThemeControlsModal-SC28YaPX.js"; import { ErrorBoundary as u } from "react-error-boundary"; import "@emotion/react"; import "@emotion/serialize"; import "@emotion/utils"; import "@emotion/is-prop-valid"; import "react-dom"; import "../../Alarm/AlarmControls/shared.js"; import "lodash"; import "../../../SvgGraph/index.js"; import "../../Climate/ClimateControls/data.js"; import "use-debounce"; import "../../Climate/ClimateControls/BigNumber.js"; import "@iconify/react"; import "../../../../Cards/CameraCard/players/index.js"; import "@use-gesture/react"; import "../../../PreloadImage/index.js"; import "../../../Alert/index.js"; import "../../../../ThemeProvider/constants.js"; import "../../../../ThemeProvider/store.js"; function d({ entity: r, onChange: i, reversed: m = !0, ...p }) { const t = a(r), e = s(t.state); return /* @__PURE__ */ o(f, { disabled: e, ...p, reversed: m, checked: t.state === l, onChange: (n) => { i && i(t, n), t.service.toggle(); } }); } function G(r) { return /* @__PURE__ */ o(u, { ...c({ prefix: "SwitchControls" }), children: /* @__PURE__ */ o(d, { ...r }) }); } export { G as SwitchControls }; //# sourceMappingURL=index.js.map