import { property } from "lit/decorators.js";
import { ObcAbstractAutomationButton } from "./abstract-automation-button.js";
import { AutomationButtonLabelDirection } from "./automation-button.js";
var __defProp = Object.defineProperty;
var __decorateClass = (decorators, target, key, kind) => {
  var result = void 0;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = decorator(target, key, result) || result;
  if (result) __defProp(target, key, result);
  return result;
};
var MotorizedVariant = /* @__PURE__ */ ((MotorizedVariant2) => {
  MotorizedVariant2["regular"] = "regular";
  MotorizedVariant2["double"] = "double";
  MotorizedVariant2["flat"] = "flat";
  return MotorizedVariant2;
})(MotorizedVariant || {});
class ObcAbstractAutomationButtonMotorized extends ObcAbstractAutomationButton {
  constructor() {
    super(...arguments);
    this.on = false;
    this.speedInPercent = 0;
    this.labelDirection = AutomationButtonLabelDirection.right;
    this.variant = "regular";
  }
  get extraReadouts() {
    if (this.speedInPercent !== void 0 && this.speedInPercent !== null && this.on) {
      return [
        {
          type: "value",
          value: this.speedInPercent,
          nDigits: 3,
          unit: "%",
          direction: this.labelDirection,
          icon: "chevron"
        }
      ];
    } else if (!this.on) {
      return [
        {
          type: "state-off",
          value: "Off",
          hasIcon: true
        }
      ];
    }
    return [];
  }
  get _on() {
    return this.on;
  }
}
__decorateClass([
  property({ type: Boolean })
], ObcAbstractAutomationButtonMotorized.prototype, "on");
__decorateClass([
  property({ type: Number })
], ObcAbstractAutomationButtonMotorized.prototype, "speedInPercent");
__decorateClass([
  property({ type: String })
], ObcAbstractAutomationButtonMotorized.prototype, "labelDirection");
__decorateClass([
  property({ type: String })
], ObcAbstractAutomationButtonMotorized.prototype, "variant");
export {
  MotorizedVariant,
  ObcAbstractAutomationButtonMotorized
};
//# sourceMappingURL=abstract-automation-button-motorized.js.map
