"use strict";
var import_elements = require("../../elements/index.js");
var import_models = require("../../models/index.js");
var import_ModelValidator = require("./ModelValidator.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import_ModelValidator.ModelValidator.validators[import_elements.ClusterElement.Tag] = class DeviceTypeValidator extends import_ModelValidator.ModelValidator {
  validate() {
    this.validateStructure(false, import_models.DatatypeModel, import_models.AttributeModel, import_models.CommandModel, import_models.EventModel);
    this.validateProperty({ name: "singleton", type: "boolean" });
    this.validateProperty({ name: "classification", type: import_elements.ClusterElement.Classification });
    if (!this.model.children.length && this.model.type === void 0) {
      this.error("EMPTY_CLUSTER", "Cluster has no elements");
    }
    super.validate();
  }
};
//# sourceMappingURL=ClusterValidator.js.map
