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

export type PdfIconProps = 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 PdfIcon = ({ title, size, color, ...props }: PdfIconProps) => {
  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.304z" clipRule="evenodd" /><path fillRule="evenodd" d="M8.258 14.25v.742h.747v-.742zm0 1.742h.749a1 1 0 0 0 .999-.999v-.744a1 1 0 0 0-1-1H7.759l-.5.002v4.743h1v-2.002Zm3.495-1.742v2.74h.747v-2.74zm0 3.74h.748a1 1 0 0 0 1-1v-2.74a1 1 0 0 0-1-1h-1.748v4.744h1v-.005Zm3.745-3.74h1.247v-1h-2.247v4.744h1v-1.997h1.247v-1h-1.247z" clipRule="evenodd" /></svg>
  );
};