"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.BreadCrumbItem = void 0;

var _react = _interopRequireDefault(require("react"));

var _primitives = require("../../primitives");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const BreadCrumbItem = props => {
  const {
    children,
    isCurrentPage,
    ...remainingProps
  } = props;
  return /*#__PURE__*/_react.default.createElement(_primitives.Flex, remainingProps, _react.default.Children.map(children, (child, index) => {
    return /*#__PURE__*/_react.default.cloneElement(child, {
      key: "breadcrumb-item-".concat(index),
      ...remainingProps,
      ...{
        isUnderlined: isCurrentPage ? false : undefined
      }
    });
  }));
};

exports.BreadCrumbItem = BreadCrumbItem;
//# sourceMappingURL=BreadCrumbItem.js.map