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

export type PencilIconProps = 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 PencilIcon = ({ title, size, color, ...props }: PencilIconProps) => {
  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="M14.77 4.37a3.829 3.829 0 0 1 5.41 0 3.828 3.828 0 0 1 0 5.41l-.002.002L8.608 21.25H3.25v-5.31L14.769 4.371ZM4.75 16.56v3.191h3.242l9.713-9.629-3.3-3.262zM19.12 5.43a2.329 2.329 0 0 0-3.29 0l-.366.367 3.306 3.268.352-.347a2.329 2.329 0 0 0-.002-3.287Z" /></svg>
  );
};