/**
 * @license lucide-preact v1.0.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */

import { h } from 'preact';
import { mergeClasses } from './shared/src/utils/mergeClasses.js';
import { toKebabCase } from './shared/src/utils/toKebabCase.js';
import { toPascalCase } from './shared/src/utils/toPascalCase.js';
import Icon from './Icon.js';

const createLucideIcon = (iconName, iconNode) => {
  const Component = ({ class: classes = "", className = "", children, ...props }) => h(
    Icon,
    {
      ...props,
      iconNode,
      class: mergeClasses(
        `lucide-${toKebabCase(toPascalCase(iconName))}`,
        `lucide-${toKebabCase(iconName)}`,
        classes,
        className
      )
    },
    children
  );
  Component.displayName = toPascalCase(iconName);
  return Component;
};

export { createLucideIcon as default };
//# sourceMappingURL=createLucideIcon.js.map
