// src/components/DropdownMenu/Item.tsx
import { cloneElement, isValidElement, Children } from "react";
import classNames from "classnames/dedupe";
import { jsx } from "react/jsx-runtime";
var Item = ({ ref, ...props }) => {
  const {
    elementType: Element = "li",
    active,
    onClick,
    children,
    ...otherProps
  } = props;
  const classes = classNames(
    "mobius",
    "mobius-dropdown-menu__item",
    { "--is-active": active },
    otherProps.className
  );
  return /* @__PURE__ */ jsx(Element, { ref, onClick, ...otherProps, children: Children.map(children, (child) => {
    if (isValidElement(child)) {
      const childClasses = classNames(
        child.props.className,
        classes
      );
      return cloneElement(child, {
        className: childClasses
      });
    }
    return /* @__PURE__ */ jsx("span", { className: classes, children: child });
  }) });
};
Item.displayName = "DropdownMenu.Item";

export {
  Item
};
//# sourceMappingURL=chunk-6TSYA7CJ.js.map
