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

export type DataIconProps = 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 DataIcon = ({ title, size, color, ...props }: DataIconProps) => {
  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="M16.49 9.241a1.737 1.737 0 0 0-1.737-1.736H7.505v8.985h8.984V9.241Zm-1.99.264V14.5H9.505V9.505zM11.005 13H13v-1.995h-1.995zm6.984-3.495h2.501v1.5h-2.5V13h2.5v1.5h-2.5v3.49H14.5v2.75H13v-2.75h-1.995v2.75h-1.5v-2.75h-3.5V14.5h-2.49V13h2.49v-1.995h-2.49v-1.5h2.49v-3.5h3.5v-2.24h1.5v2.24H13v-2.24h1.5v2.24h.253a3.237 3.237 0 0 1 3.236 3.236z" /></svg>
  );
};