import { jsx } from 'react/jsx-runtime';
import React__default from 'react';
import { c as cn } from './utils-BJnb9o5c.js';

function renderIcon(icon, extraClassName) {
  if (typeof icon === "string") {
    return /* @__PURE__ */ jsx("i", { className: cn(icon, extraClassName), "aria-hidden": "true" });
  }
  if (React__default.isValidElement(icon)) {
    return React__default.cloneElement(
      icon,
      {
        "aria-hidden": "true",
        className: cn(
          icon.props.className,
          extraClassName
        )
      }
    );
  }
  const IconComp = icon;
  return /* @__PURE__ */ jsx(IconComp, { "aria-hidden": "true", className: extraClassName });
}

export { renderIcon as r };
//# sourceMappingURL=renderIcon-C6twJSqH.js.map
