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

export type MailIconProps = 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 MailIcon = ({ title, size, color, ...props }: MailIconProps) => {
  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="M2.016 4.512h19.973v11.734a3.247 3.247 0 0 1-3.247 3.247H5.262a3.247 3.247 0 0 1-3.246-3.247zm1.5 2.564 6.223 6.226a3.248 3.248 0 0 0 4.59 0l.003-.003 6.157-6.216v9.163c0 .964-.783 1.747-1.747 1.747H5.262a1.747 1.747 0 0 1-1.746-1.747zm15.922-1.064H4.573l6.227 6.229c.68.68 1.787.68 2.468.001l.001-.001z" clipRule="evenodd" /></svg>
  );
};