// src/components/Breadcrumbs/Breadcrumbs.tsx
import { Children, cloneElement } from "react";
import classNames from "classnames/dedupe";
import "@simplybusiness/mobius/src/components/Breadcrumbs/Breadcrumbs.css";
import { jsx } from "react/jsx-runtime";
var Breadcrumbs = ({ ref, ...props }) => {
  const { "aria-label": ariaLabel = "Breadcrumbs" } = props;
  const { navProps } = { navProps: { "aria-label": ariaLabel } };
  const { children, ...otherProps } = props;
  const childArray = Children.toArray(children);
  const classes = classNames(
    "mobius",
    "mobius-breadcrumb",
    otherProps.className
  );
  return /* @__PURE__ */ jsx("nav", { ref, ...otherProps, ...navProps, className: classes, children: /* @__PURE__ */ jsx("ul", { children: childArray.map(
    (child, i) => cloneElement(child, {
      isCurrent: i === childArray.length - 1
    })
  ) }) });
};
Breadcrumbs.displayName = "Breadcrumbs";

export {
  Breadcrumbs
};
//# sourceMappingURL=chunk-P7TPNRU4.js.map
