var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result) __defProp(target, key, result);
  return result;
};
/**
 * @license
 * Copyright 2025-2026 Open Home Foundation
 * SPDX-License-Identifier: Apache-2.0
 */
import "@material/web/button/filled-button";
import "@material/web/button/outlined-button";
import { html } from "lit";
import { customElement } from "lit/decorators.js";
import { handleAsync } from "../../../util/async-handler.js";
import { BaseClusterCommands } from "../base-cluster-commands.js";
import { registerClusterCommands } from "../registry.js";
const CLUSTER_ID = 6;
let OnOffClusterCommands = class extends BaseClusterCommands {
  render() {
    return html`
            <details class="command-panel">
                <summary>OnOff Commands</summary>
                <div class="command-content">
                    <div class="command-row">
                        <md-outlined-button @click=${handleAsync(() => this._handleOn())}>On</md-outlined-button>
                        <md-outlined-button @click=${handleAsync(() => this._handleOff())}>Off</md-outlined-button>
                        <md-outlined-button @click=${handleAsync(() => this._handleToggle())}
                            >Toggle</md-outlined-button
                        >
                    </div>
                </div>
            </details>
        `;
  }
  async _handleOn() {
    await this.sendCommand("On");
  }
  async _handleOff() {
    await this.sendCommand("Off");
  }
  async _handleToggle() {
    await this.sendCommand("Toggle");
  }
};
OnOffClusterCommands = __decorateClass([
  customElement("on-off-cluster-commands")
], OnOffClusterCommands);
registerClusterCommands(CLUSTER_ID, "on-off-cluster-commands");
//# sourceMappingURL=on-off-commands.js.map
