/**
 * @license
 * Copyright 2025-2026 Open Home Foundation
 * SPDX-License-Identifier: Apache-2.0
 */
class MatterNode {
  constructor(data) {
    this.data = data;
    this.node_id = data.node_id;
    this.date_commissioned = data.date_commissioned;
    this.last_interview = data.last_interview;
    this.interview_version = data.interview_version;
    this.available = data.available;
    this.is_bridge = data.is_bridge;
    this.attributes = data.attributes;
    this.attribute_subscriptions = data.attribute_subscriptions;
    this.matter_version = data.matter_version;
  }
  node_id;
  date_commissioned;
  last_interview;
  interview_version;
  available;
  is_bridge;
  attributes;
  /** Attribute subscriptions (always empty array in current protocol, matches Python Matter Server) */
  attribute_subscriptions;
  /**
   * Matter specification version of the node (e.g., "1.2.0", "1.3.0", "1.4.0").
   * Optional - not available in Python Matter Server.
   */
  matter_version;
  get nodeLabel() {
    const label = this.attributes["0/40/5"];
    if (typeof label !== "string") return "";
    if (label.includes("\0\0")) return "";
    return label.trim();
  }
  get vendorName() {
    const value = this.attributes["0/40/1"];
    return typeof value === "string" ? value : "";
  }
  get productName() {
    const value = this.attributes["0/40/3"];
    return typeof value === "string" ? value : "";
  }
  get serialNumber() {
    const value = this.attributes["0/40/15"];
    return typeof value === "string" ? value : "";
  }
  get updateState() {
    const value = this.attributes["0/42/2"];
    return typeof value === "number" ? value : void 0;
  }
  get updateStateProgress() {
    const value = this.attributes["0/42/3"];
    return typeof value === "number" ? value : void 0;
  }
  update(data) {
    return new MatterNode({ ...this.data, ...data });
  }
}
export {
  MatterNode
};
//# sourceMappingURL=node.js.map
