/*
 * Copyright 2026 Palantir Technologies, Inc. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import React from "react";
import { CbacBanner } from "../../cbac-picker/CbacBanner.js";
import { toMarkingIdArray } from "../utils/markingValue.js";
import styles from "./MandatoryMarkingCell.module.css";
/**
 * Renders one CBAC-resolved banner per marking on the row. MANDATORY marking
 * columns render per-marking (rather than via a single combined banner) so
 * each individual marking on the object is visible at a glance.
 */
export function MandatoryMarkingCell({
  value
}) {
  const markingIds = toMarkingIdArray(value);
  if (markingIds.length === 0) {
    return null;
  }
  return /*#__PURE__*/React.createElement("span", {
    className: styles.container
  }, markingIds.map(id => /*#__PURE__*/React.createElement(CbacBanner, {
    key: id,
    markingIds: [id],
    className: styles.pill
  })));
}
//# sourceMappingURL=MandatoryMarkingCell.js.map