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

export type HelpIconProps = 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 HelpIcon = ({ title, size, color, ...props }: HelpIconProps) => {
  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="M19.49 12.003a7.488 7.488 0 1 0-14.976-.001 7.488 7.488 0 0 0 14.976 0Zm-5.74-2.497a1.747 1.747 0 0 0-3.493 0h-1.5a3.247 3.247 0 1 1 3.997 3.158v1.835h-1.5v-3.246h.75c.964 0 1.746-.784 1.746-1.747m7.241 2.497a8.988 8.988 0 1 1-17.975-.001 8.988 8.988 0 0 1 17.975 0Z" /><path d="M12.003 17.744a1.123 1.123 0 1 0 0-2.247 1.123 1.123 0 0 0 0 2.247" /></svg>
  );
};