"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
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 AttributeModel_exports = {};
__export(AttributeModel_exports, {
  AttributeModel: () => AttributeModel,
  GLOBAL_IDS: () => GLOBAL_IDS
});
module.exports = __toCommonJS(AttributeModel_exports);
var import_elements = require("../elements/index.js");
var import_Model = require("./Model.js");
var import_PropertyModel = require("./PropertyModel.js");
/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
const GLOBAL_IDS = /* @__PURE__ */ new Set([65533, 65532, 65531, 65530, 65529, 65528]);
class AttributeModel extends import_PropertyModel.PropertyModel {
  tag = import_elements.AttributeElement.Tag;
  get readable() {
    return this.effectiveAccess.readable;
  }
  get writable() {
    return !this.fixed && this.effectiveAccess.writable;
  }
  get fabricScoped() {
    return !!this.effectiveAccess.fabric;
  }
  get fixed() {
    return !!this.effectiveQuality.fixed;
  }
  get changesOmitted() {
    return this.effectiveQuality.changesOmitted;
  }
  get requiredFields() {
    return { ...super.requiredFields, id: this.id };
  }
  constructor(definition) {
    super(definition);
  }
  static {
    import_Model.Model.types[import_elements.AttributeElement.Tag] = this;
  }
  static isGlobal(model) {
    return model instanceof AttributeModel && GLOBAL_IDS.has(model.id);
  }
  static get globalIds() {
    return GLOBAL_IDS;
  }
  static Tag = import_elements.AttributeElement.Tag;
}
//# sourceMappingURL=AttributeModel.js.map
