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

export type ExamIconProps = 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 ExamIcon = ({ title, size, color, ...props }: ExamIconProps) => {
  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 fillRule="evenodd" d="M6.51 2.016h13.482v16.727a3.247 3.247 0 0 1-3.247 3.246H7.26a3.247 3.247 0 0 1-3.246-3.246v-2.248H6.51V2.015Zm1.5 14.479h6.988v2.248a1.747 1.747 0 0 0 3.494 0V3.516H8.009v12.979Zm5.998 3.994a3.23 3.23 0 0 1-.51-1.746v-.748H5.514v.748c0 .963.782 1.746 1.746 1.746h6.75ZM9.506 7.009h1.498v1.5H9.506zm2.496 0h4.993v1.5h-4.993zm-2.496 2.995h1.498v1.5H9.506zm2.496 0h4.993v1.5h-4.993zM9.506 13h1.498v1.5H9.506zm2.496 0h4.993v1.5h-4.993z" clipRule="evenodd" /></svg>
  );
};