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

export type PushpinIconProps = 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 PushpinIcon = ({ title, size, color, ...props }: PushpinIconProps) => {
  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="m21.044 9.2-.555-.484-5.042-5.082-.46-.525-.56.49c-2.404 2.113-4.804 4.226-7.21 6.339-.128-.129-.257-.252-.385-.381l-.53-.52-1.044 1.06.53.519.86.846.476.54.04-.035c.672.663 1.345 1.331 2.018 1.994l-4.76 4.864 1.059 1.04 4.755-4.86c.663.658 1.331 1.312 1.994 1.97l-.03.03.535.47c.287.287.58.569.866.856l.53.52 1.044-1.055-.53-.52c-.128-.123-.252-.252-.38-.375l3.889-4.424 2.885-3.281.005.005Zm-7.834 6.656c-1.643-1.628-3.29-3.25-4.933-4.874 2.202-1.94 4.404-3.875 6.606-5.81L18.98 9.3l-1.935 2.202c-1.276 1.45-2.553 2.904-3.83 4.36z" /></svg>
  );
};