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

export type CopyIconProps = 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 CopyIcon = ({ title, size, color, ...props }: CopyIconProps) => {
  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="M10.754 3.516c-.965 0-1.746.782-1.746 1.746v9.986c0 .964.781 1.746 1.746 1.746h5.991c.965 0 1.747-.782 1.747-1.746V5.262c0-.964-.782-1.746-1.747-1.746zM7.508 5.262a3.246 3.246 0 0 1 3.246-3.246h5.991a3.246 3.246 0 0 1 3.247 3.246v9.986a3.246 3.246 0 0 1-3.247 3.246h-5.991a3.246 3.246 0 0 1-3.246-3.246zm-3.495 13.48V5.513h1.5v13.23c0 .964.782 1.747 1.746 1.747H14v1.5H7.26a3.247 3.247 0 0 1-3.246-3.246Z" clipRule="evenodd" /></svg>
  );
};