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

export type ChartIconProps = 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 ChartIcon = ({ title, size, color, ...props }: ChartIconProps) => {
  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="M3 12c0-4.125 2.772-7.592 6.546-8.661l.408 1.442a7.502 7.502 0 1 0 9.265 9.265l1.442.408A9.002 9.002 0 0 1 3 12m9-9a9 9 0 0 1 9 9v.75h-9.75V3zm.75 8.25h6.712a7.504 7.504 0 0 0-6.712-6.713z" /></svg>
  );
};