/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { camelize } from "#general";
import { FieldModel } from "../../models/index.js";
function FeatureBitmap(bitmap = {}) {
  if (Array.isArray(bitmap)) {
    return Object.fromEntries(bitmap.map((name) => [name, true]));
  }
  return bitmap;
}
function translateBitmap(bitmap, cluster) {
  return Object.fromEntries(
    Object.entries(bitmap).map(([k, v]) => {
      const feature = cluster.featureMap.get(FieldModel, k);
      return [camelize(feature?.title ?? k), v];
    })
  );
}
export {
  FeatureBitmap,
  translateBitmap
};
//# sourceMappingURL=FeatureBitmap.js.map
