"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var PowerlevelCC_validateArgs_exports = {};
__export(PowerlevelCC_validateArgs_exports, {
  validateArgs_PowerlevelCCAPI_reportPowerlevel: () => validateArgs_PowerlevelCCAPI_reportPowerlevel,
  validateArgs_PowerlevelCCAPI_sendNodeTestReport: () => validateArgs_PowerlevelCCAPI_sendNodeTestReport,
  validateArgs_PowerlevelCCAPI_setCustomPowerlevel: () => validateArgs_PowerlevelCCAPI_setCustomPowerlevel,
  validateArgs_PowerlevelCCAPI_startNodeTest: () => validateArgs_PowerlevelCCAPI_startNodeTest
});
module.exports = __toCommonJS(PowerlevelCC_validateArgs_exports);
var v = __toESM(require("@zwave-js/core/validation"), 1);
function validateArgs_PowerlevelCCAPI_setCustomPowerlevel() {
  return (__decoratedMethod, { kind }) => {
    if (kind === "method") {
      return /* @__PURE__ */ __name(function setCustomPowerlevel(powerlevel, timeout) {
        v.assert(v.enum({ kind: "parameter", name: "powerlevel" }, "Powerlevel", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])(powerlevel), v.primitive({ kind: "parameter", name: "timeout" }, "number")(timeout));
        return __decoratedMethod.call(this, powerlevel, timeout);
      }, "setCustomPowerlevel");
    }
  };
}
__name(validateArgs_PowerlevelCCAPI_setCustomPowerlevel, "validateArgs_PowerlevelCCAPI_setCustomPowerlevel");
function validateArgs_PowerlevelCCAPI_reportPowerlevel() {
  return (__decoratedMethod, { kind }) => {
    if (kind === "method") {
      return /* @__PURE__ */ __name(function reportPowerlevel(options) {
        v.assert(v.oneOf({ kind: "parameter", name: "options" }, "PowerlevelCCReportOptions", v.object({ kind: "parameter", name: "options" }, "<anonymous object>", { "powerlevel": v.literal({ kind: "property", name: "powerlevel" }, 0), "timeout": v.undefined({ kind: "property", name: "timeout" }) }), v.object({ kind: "parameter", name: "options" }, "<anonymous object>", { "powerlevel": v.oneOf({ kind: "property", name: "powerlevel" }, void 0, v.literal({ kind: "property", name: "powerlevel" }, 1), v.literal({ kind: "property", name: "powerlevel" }, 2), v.literal({ kind: "property", name: "powerlevel" }, 3), v.literal({ kind: "property", name: "powerlevel" }, 4), v.literal({ kind: "property", name: "powerlevel" }, 5), v.literal({ kind: "property", name: "powerlevel" }, 6), v.literal({ kind: "property", name: "powerlevel" }, 7), v.literal({ kind: "property", name: "powerlevel" }, 8), v.literal({ kind: "property", name: "powerlevel" }, 9)), "timeout": v.primitive({ kind: "property", name: "timeout" }, "number") }))(options));
        return __decoratedMethod.call(this, options);
      }, "reportPowerlevel");
    }
  };
}
__name(validateArgs_PowerlevelCCAPI_reportPowerlevel, "validateArgs_PowerlevelCCAPI_reportPowerlevel");
function validateArgs_PowerlevelCCAPI_startNodeTest() {
  return (__decoratedMethod, { kind }) => {
    if (kind === "method") {
      return /* @__PURE__ */ __name(function startNodeTest(testNodeId, powerlevel, testFrameCount) {
        v.assert(v.primitive({ kind: "parameter", name: "testNodeId" }, "number")(testNodeId), v.enum({ kind: "parameter", name: "powerlevel" }, "Powerlevel", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])(powerlevel), v.primitive({ kind: "parameter", name: "testFrameCount" }, "number")(testFrameCount));
        return __decoratedMethod.call(this, testNodeId, powerlevel, testFrameCount);
      }, "startNodeTest");
    }
  };
}
__name(validateArgs_PowerlevelCCAPI_startNodeTest, "validateArgs_PowerlevelCCAPI_startNodeTest");
function validateArgs_PowerlevelCCAPI_sendNodeTestReport() {
  return (__decoratedMethod, { kind }) => {
    if (kind === "method") {
      return /* @__PURE__ */ __name(function sendNodeTestReport(options) {
        v.assert(v.object({ kind: "parameter", name: "options" }, "PowerlevelCCTestNodeReportOptions", { "testNodeId": v.primitive({ kind: "property", name: "testNodeId" }, "number"), "status": v.enum({ kind: "property", name: "status" }, "PowerlevelTestStatus"), "acknowledgedFrames": v.primitive({ kind: "property", name: "acknowledgedFrames" }, "number") })(options));
        return __decoratedMethod.call(this, options);
      }, "sendNodeTestReport");
    }
  };
}
__name(validateArgs_PowerlevelCCAPI_sendNodeTestReport, "validateArgs_PowerlevelCCAPI_sendNodeTestReport");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  validateArgs_PowerlevelCCAPI_reportPowerlevel,
  validateArgs_PowerlevelCCAPI_sendNodeTestReport,
  validateArgs_PowerlevelCCAPI_setCustomPowerlevel,
  validateArgs_PowerlevelCCAPI_startNodeTest
});
//# sourceMappingURL=PowerlevelCC._validateArgs.js.map
