/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Metatype } from "@matter/model";
import { BitmapManager } from "./BitmapManager.js";
import { ListManager } from "./ListManager.js";
import { PrimitiveManager } from "./PrimitiveManager.js";
import { StructManager } from "./StructManager.js";
function ValueManager(schema, owner) {
  switch (schema.effectiveMetatype) {
    case Metatype.object:
      return StructManager(owner, schema);
    case Metatype.bitmap:
      return BitmapManager(owner, schema);
    case Metatype.array:
      return ListManager(owner, schema);
    // TODO - for completeness we should either make ByteArray immutable in state or wrap here but meh
    default:
      return PrimitiveManager;
  }
}
export {
  ValueManager
};
//# sourceMappingURL=ValueManager.js.map
