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

export type ChatIconProps = 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 ChatIcon = ({ title, size, color, ...props }: ChatIconProps) => {
  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="M21 3.75v13.5H8.25A3.75 3.75 0 0 0 4.5 21H3V3.75zM4.5 17.327a5.234 5.234 0 0 1 3.75-1.577H19.5V5.25h-15zM12 11.75v1.5H6.5v-1.5zm5.5-4v1.5h-11v-1.5z" /></svg>
  );
};