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

export type TicketIconProps = 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 TicketIcon = ({ title, size, color, ...props }: TicketIconProps) => {
  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="M9.882 2.016v.75c0 1.173.947 2.12 2.12 2.121a2.118 2.118 0 0 0 2.121-2.121v-.75h5.12v19.973h-5.12v-.75c0-1.174-.948-2.12-2.121-2.12s-2.12.946-2.12 2.12v.75h-5.12V2.015h5.12Zm-3.62 6.99h2.495v1.5H6.262v9.982H8.46a3.618 3.618 0 0 1 3.542-2.87 3.618 3.618 0 0 1 3.543 2.87h2.198v-9.982h-2.496v-1.5h2.496v-5.49h-2.198a3.619 3.619 0 0 1-3.543 2.871A3.618 3.618 0 0 1 8.46 3.516H6.262zm7.238 0v1.5h-2.995v-1.5z" /></svg>
  );
};