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

export type SuccessIconProps = 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 SuccessIcon = ({ title, size, color, ...props }: SuccessIconProps) => {
  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.5 12a7.5 7.5 0 1 0-15 0 7.5 7.5 0 0 0 15 0m-2.97-2.22L11 15.31l-3.28-3.28 1.06-1.06L11 13.19l4.47-4.47zM21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0" /></svg>
  );
};