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

export type EditIconProps = 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 EditIcon = ({ title, size, color, ...props }: EditIconProps) => {
  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="M5 16.355v-8.71A2.647 2.647 0 0 1 7.645 5H12v1.5H7.645c-.631 0-1.145.514-1.145 1.145v8.71c0 .63.514 1.145 1.145 1.145h8.71c.631 0 1.145-.515 1.145-1.145V12H19v4.355A2.647 2.647 0 0 1 16.355 19h-8.71A2.648 2.648 0 0 1 5 16.355M16.63 3.749a2.564 2.564 0 0 1 3.62 0 2.564 2.564 0 0 1 0 3.621l-.002.002-6.71 6.66-.219.218H9.75v-3.569l6.878-6.93zm-5.38 7.55v1.451h1.451l5.012-4.976-1.488-1.489L11.25 11.3Zm7.94-6.49a1.064 1.064 0 0 0-1.5 0l-.409.412 1.496 1.496.414-.41c.41-.411.41-1.086-.002-1.497Z" /></svg>
  );
};