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

export type MergedIconProps = 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 MergedIcon = ({ title, size, color, ...props }: MergedIconProps) => {
  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="M4 16.978V7.022A3.025 3.025 0 0 1 7.022 4H12v1.714H7.022a1.31 1.31 0 0 0-1.308 1.308v9.956c0 .72.588 1.307 1.308 1.308h9.956a1.31 1.31 0 0 0 1.308-1.308V12H20v4.978A3.025 3.025 0 0 1 16.978 20H7.022A3.025 3.025 0 0 1 4 16.978" /><path d="M18.286 16.978V7.022a1.31 1.31 0 0 0-1.308-1.308H7.022a1.31 1.31 0 0 0-1.308 1.308V12H4V7.022A3.025 3.025 0 0 1 7.022 4h9.956A3.025 3.025 0 0 1 20 7.022v9.956A3.025 3.025 0 0 1 16.978 20H12v-1.714h4.978a1.31 1.31 0 0 0 1.308-1.308" /></svg>
  );
};