"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 ValueManager_exports = {};
__export(ValueManager_exports, {
  ValueManager: () => ValueManager
});
module.exports = __toCommonJS(ValueManager_exports);
var import_model = require("#model");
var import_BitmapManager = require("./BitmapManager.js");
var import_ListManager = require("./ListManager.js");
var import_PrimitiveManager = require("./PrimitiveManager.js");
var import_StructManager = require("./StructManager.js");
/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
function ValueManager(schema, owner) {
  switch (schema.effectiveMetatype) {
    case import_model.Metatype.object:
      return (0, import_StructManager.StructManager)(owner, schema);
    case import_model.Metatype.bitmap:
      return (0, import_BitmapManager.BitmapManager)(owner, schema);
    case import_model.Metatype.array:
      return (0, import_ListManager.ListManager)(owner, schema);
    // TODO - for completeness we should either make ByteArray immutable in state or wrap here but meh
    default:
      return import_PrimitiveManager.PrimitiveManager;
  }
}
//# sourceMappingURL=ValueManager.js.map
