import { useId, type SVGProps } from 'react';

export type SparkleIconProps = SVGProps<SVGSVGElement> & {
  /** Accessibility title for the icon, set aria-hidden="true" if the icon is purely decorative. */
  title?: string;
  /**
   * The size of the icon.
   * It sets the font-size, possible as the width and height is `1em`. If not set, the icon will inherit the font size of its parent.
   */
  size?: '2xl' | 'xl' | 'large' | 'medium' | 'small';
  /**
   * The color of the icon.
   * @default 'inherit'
   */
  color?: 'inherit' | 'primary' | 'gray' | 'black' | 'white';
};

export const SparkleIcon = ({ title, size, color, ...props }: SparkleIconProps) => {
  const titleId = useId();
  return (
    <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" focusable='false' role='img' width='1em' height='1em'  aria-labelledby={title ? titleId : undefined} data-size={size} data-color={color} {...props}>{title ? <title id={titleId}>{title}</title> : null}<path d="m14.75 7.01.008.321a6.242 6.242 0 0 0 5.91 5.91l.321.01v1.5a6.241 6.241 0 0 0-6.231 5.917l-.008.321h-1.5a6.241 6.241 0 0 0-6.24-6.239v-1.5l.321-.009a6.242 6.242 0 0 0 5.92-6.231h1.5ZM14 10.336a7.772 7.772 0 0 1-3.664 3.663 7.773 7.773 0 0 1 3.663 3.664A7.775 7.775 0 0 1 17.663 14 7.773 7.773 0 0 1 14 10.336m-6.365-7.32a3.12 3.12 0 0 0 3.119 3.119v1.5a3.12 3.12 0 0 0-3.12 3.119h-1.5a3.12 3.12 0 0 0-3.118-3.12v-1.5a3.12 3.12 0 0 0 3.119-3.118zm-.75 2.521a4.63 4.63 0 0 1-1.348 1.348c.537.35.997.81 1.348 1.347.35-.537.81-.996 1.347-1.347a4.64 4.64 0 0 1-1.347-1.348" /></svg>
  );
};