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

export type AttachFileIconProps = 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 AttachFileIcon = ({ title, size, color, ...props }: AttachFileIconProps) => {
  const titleId = useId();
  return (
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" focusable='false' role='img' width='1em' height='1em' fill='currentColor' aria-labelledby={title ? titleId : undefined} data-size={size} data-color={color} {...props}>{title ? <title id={titleId}>{title}</title> : null}<path d="M706.92-334.23q0 97.46-67.81 165.84Q571.31-100 474.23-100q-97.46 0-165.46-68.39-68-68.38-68-165.84v-359.62q0-69.23 48.08-117.69Q336.92-860 406.15-860t117.31 48.46 48.08 117.69v340.39q0 40.61-28.35 69.34-28.34 28.73-68.96 28.73-40.61 0-69.34-28.53-28.73-28.54-28.73-69.54v-351.15h59.99v351.15q0 16.08 10.81 27.08t26.89 11q16.07 0 26.88-11t10.81-27.08v-340.77q-.62-44.31-30.85-75.04T406.15-800q-44.3 0-74.84 30.92-30.54 30.93-30.54 75.23v359.62q-.62 72.54 50.15 123.38Q401.69-160 474.23-160q71.54 0 121.5-50.85 49.96-50.84 51.19-123.38v-370.38h60z" /></svg>
  );
};