/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { AttributeElement } from "../elements/index.js";
import { Model } from "./Model.js";
import { PropertyModel } from "./PropertyModel.js";
const GLOBAL_IDS = /* @__PURE__ */ new Set([65533, 65532, 65531, 65530, 65529, 65528]);
class AttributeModel extends PropertyModel {
  tag = 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 {
    Model.types[AttributeElement.Tag] = this;
  }
  static isGlobal(model) {
    return model instanceof AttributeModel && GLOBAL_IDS.has(model.id);
  }
  static get globalIds() {
    return GLOBAL_IDS;
  }
  static Tag = AttributeElement.Tag;
}
export {
  AttributeModel,
  GLOBAL_IDS
};
//# sourceMappingURL=AttributeModel.js.map
