/**
 * @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, toChildArray } from 'preact';
import defaultAttributes from './defaultAttributes.js';
import { hasA11yProp } from './shared/src/utils/hasA11yProp.js';

const Icon = ({
  color = "currentColor",
  size = 24,
  strokeWidth = 2,
  absoluteStrokeWidth,
  children,
  iconNode,
  class: classes = "",
  ...rest
}) => h(
  "svg",
  {
    ...defaultAttributes,
    width: String(size),
    height: size,
    stroke: color,
    ["stroke-width"]: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
    class: ["lucide", classes].join(" "),
    ...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
    ...rest
  },
  [...iconNode.map(([tag, attrs]) => h(tag, attrs)), ...toChildArray(children)]
);

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