"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var endpoint_mixins_exports = {};
__export(endpoint_mixins_exports, {
  EndpointMixins: () => EndpointMixins,
  FeatureAPIsMixin: () => FeatureAPIsMixin
});
module.exports = __toCommonJS(endpoint_mixins_exports);
var import_core = require("@zwave-js/core");
var import_AccessControl = require("../feature-apis/AccessControl.js");
var import_Base = require("./00_Base.js");
class FeatureAPIsMixin extends import_Base.EndpointBase {
  static {
    __name(this, "FeatureAPIsMixin");
  }
  _accessControl;
  /**
   * High-level API for managing users and credentials on access control
   * devices. Returns `undefined` if the endpoint supports neither the
   * **User Credential CC** nor the **User Code CC**.
   */
  get accessControl() {
    if (!this.supportsCC(import_core.CommandClasses["User Credential"]) && !this.supportsCC(import_core.CommandClasses["User Code"])) {
      return void 0;
    }
    this._accessControl ??= new import_AccessControl.AccessControlAPI(this);
    return this._accessControl;
  }
}
class EndpointMixins extends FeatureAPIsMixin {
  static {
    __name(this, "EndpointMixins");
  }
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  EndpointMixins,
  FeatureAPIsMixin
});
//# sourceMappingURL=index.js.map
