import {
  Box
} from "./chunk-TJCUKTFX.js";

// src/components/Breadcrumbs/BreadcrumbItem.tsx
import { cloneElement, Children } from "react";
import classNames from "classnames/dedupe";
import { jsx, jsxs } from "react/jsx-runtime";
var BreadcrumbItem = ({ ref, ...props }) => {
  const {
    isDisabled = false,
    isCurrent = false,
    "aria-current": ariaCurrent = "page",
    children,
    separator = /* @__PURE__ */ jsx(Box, { className: "mobius-breadcrumb__separator", "aria-hidden": "true", children: ">" }),
    ...otherProps
  } = props;
  const { itemProps } = {
    itemProps: {
      "aria-current": isCurrent ? ariaCurrent : void 0,
      "aria-disabled": isDisabled || isCurrent,
      ...otherProps
    }
  };
  const classes = classNames(
    "mobius",
    "mobius-breadcrumb__item",
    props.className
  );
  const child = typeof children === "string" ? /* @__PURE__ */ jsx("span", { ...itemProps, children }) : Children.only(children);
  return /* @__PURE__ */ jsxs("li", { className: classes, children: [
    cloneElement(child, {
      ...child.props,
      ...itemProps,
      ref
    }),
    !props.isCurrent && separator
  ] });
};
BreadcrumbItem.displayName = "BreadcrumbItem";

export {
  BreadcrumbItem
};
//# sourceMappingURL=chunk-HP2NRM7T.js.map
