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

export type BookIconProps = 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 BookIcon = ({ title, size, color, ...props }: BookIconProps) => {
  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="M8.257 3.516c-.963 0-1.745.783-1.745 1.746v10.744a3.23 3.23 0 0 1 1.745-.51zm1.5 0v11.98h7.737V3.516zm6.499 13.48H8.258a1.747 1.747 0 0 0 0 3.493h7.998a3.23 3.23 0 0 1-.51-1.746c0-.643.187-1.242.51-1.747m2.736 3.493v1.5H8.258a3.248 3.248 0 0 1-3.237-2.997h-.01V5.262a3.247 3.247 0 0 1 3.247-3.246h10.736v14.23h-.002v.75a1.747 1.747 0 0 0 0 3.493" clipRule="evenodd" /></svg>
  );
};