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}<g><path d="M7.375 19c0 .895.73 1.625 1.625 1.625v1.75c-.895 0-1.625.73-1.625 1.625h-1.75c0-.895-.73-1.625-1.625-1.625v-1.75c.895 0 1.625-.73 1.625-1.625zm8.5-15a8.125 8.125 0 0 0 7.707 8.114l.418.011v1.75a8.125 8.125 0 0 0-8.114 7.706l-.011.419h-1.75A8.125 8.125 0 0 0 6 13.875v-1.75l.418-.01A8.125 8.125 0 0 0 14.125 4zM15 8.063a9.905 9.905 0 0 1-4.938 4.936A9.907 9.907 0 0 1 15 17.937 9.908 9.908 0 0 1 19.936 13 9.905 9.905 0 0 1 15 8.063M5.375 0l.005.187A3.621 3.621 0 0 0 9 3.625v1.75A3.622 3.622 0 0 0 5.375 9h-1.75A3.622 3.622 0 0 0 0 5.375v-1.75l.187-.005A3.621 3.621 0 0 0 3.625 0zm-.876 2.94a5.39 5.39 0 0 1-1.56 1.56A5.39 5.39 0 0 1 4.5 6.059 5.39 5.39 0 0 1 6.06 4.5a5.395 5.395 0 0 1-1.561-1.56" /></g><defs></defs></svg>
  );
};