/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { translateBitmap } from "./FeatureBitmap.js";
function conditionToBitmaps(condition, cluster) {
  const bitmap = {};
  if (condition.allOf) {
    for (const name of condition.allOf) {
      bitmap[name] = true;
    }
  }
  if (condition.not) {
    bitmap[condition.not] = false;
  }
  if (!condition.anyOf) {
    return [translateBitmap(bitmap, cluster)];
  }
  const bitmaps = Array();
  for (const name of condition.anyOf) {
    bitmaps.push(translateBitmap({ ...bitmap, [name]: true }, cluster));
  }
  return bitmaps;
}
export {
  conditionToBitmaps
};
//# sourceMappingURL=VarianceCondition.js.map
