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

export type DocumentIconProps = 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 DocumentIcon = ({ title, size, color, ...props }: DocumentIconProps) => {
  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="M4.762 2.016h9.298l5.183 5.182v14.79H4.762V2.017Zm1.5 1.5v16.973h11.48V10.256H14.5a3.247 3.247 0 0 1-3.247-3.246V3.516h-4.99Zm6.49 0V7.01c0 .963.783 1.746 1.747 1.746h3.244V7.82l-4.304-4.304zm-4.494 7.736h1.498v1.5H8.258zm2.496 0h4.993v1.5h-4.993zm-2.496 2.996h1.498v1.5H8.258zm2.496 0h4.993v1.5h-4.993zm-2.496 2.996h1.498v1.5H8.258zm2.496 0h4.993v1.5h-4.993z" clipRule="evenodd" /></svg>
  );
};