/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { camelize } from "@matter/general";
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.fields(k);
      return [camelize(feature?.title ?? k), v];
    })
  );
}
export {
  FeatureBitmap,
  translateBitmap
};
//# sourceMappingURL=FeatureBitmap.js.map
