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

export type MagnifyingGlassIconProps = 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 MagnifyingGlassIcon = ({ title, size, color, ...props }: MagnifyingGlassIconProps) => {
  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="M13.5 4.5a6 6 0 1 0 0 12 6 6 0 0 0 0-12m-7.5 6a7.5 7.5 0 1 1 2.754 5.807L4.03 21.03l-1.06-1.06 4.723-4.723A7.47 7.47 0 0 1 6 10.5" clipRule="evenodd" /></svg>
  );
};