import { forwardRef, createElement } from 'react';

function createMaterialIcon(iconName, pathData) {
  const MaterialIcon = forwardRef(
    ({
      size = 24,
      color,
      className,
      style: inlineStyle,
      fill,
      ...props
    }, ref) => {
      const svgFill = fill ?? "none";
      const pathFill = fill ? void 0 : "currentColor";
      const combinedClassName = ["material-symbols", `material-symbols_${iconName}`, className].filter(Boolean).join(" ");
      return createElement(
        "svg",
        {
          ref,
          width: size,
          height: size,
          viewBox: "0 -960 960 960",
          fill: svgFill,
          xmlns: "http://www.w3.org/2000/svg",
          "aria-hidden": "true",
          className: combinedClassName,
          style: {
            color,
            ...inlineStyle
          },
          ...props
        },
        createElement("path", {
          d: pathData,
          fill: pathFill
        })
      );
    }
  );
  MaterialIcon.displayName = `MaterialIcon(${iconName})`;
  return MaterialIcon;
}

export { createMaterialIcon as default };
