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

export type CartIconProps = 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 CartIcon = ({ title, size, color, ...props }: CartIconProps) => {
  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 6.759a3.748 3.748 0 0 1 3.746-3.745 3.748 3.748 0 0 1 3.745 3.745h3.246v10.985a3.247 3.247 0 0 1-3.247 3.246H8.258a3.247 3.247 0 0 1-3.246-3.246V6.759zm0 1.5v2.995h1.5V8.259h4.491v2.995h1.5V8.259h1.746v9.485c0 .964-.783 1.746-1.747 1.746H8.258a1.747 1.747 0 0 1-1.746-1.746V8.259zm5.991-1.5H9.757a2.248 2.248 0 0 1 2.246-2.245 2.248 2.248 0 0 1 2.245 2.245" clipRule="evenodd" /></svg>
  );
};