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

export type LibraryIconProps = 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 LibraryIcon = ({ title, size, color, ...props }: LibraryIconProps) => {
  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="M10.85 3v3.5h1.987l-.691-2.802 1.713-.423a3.239 3.239 0 0 1 3.916 2.367l3.537 14.335-4.855 1.198-.179-.729-1.928-7.816V21H3.1V3zm0 16.5h2V8h-2zm-6.25 0h4.75v-15H4.6zM16.318 6.001a1.738 1.738 0 0 0-2.1-1.269l-.257.064 3.593 14.562 1.942-.48zM7.1 16.75a.25.25 0 1 0 0 .5.25.25 0 0 0 0-.5m1.25.25a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0" /></svg>
  );
};