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

export type ElementsIconProps = 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 ElementsIcon = ({ title, size, color, ...props }: ElementsIconProps) => {
  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="m12.127 3.014 4.42 7.651h-8.84zm0 2.999-1.82 3.152h3.641l-1.82-3.152ZM3.015 12h6.992v6.992H3.015zm1.5 1.5v3.992h3.992V13.5zm12.48.999a2.495 2.495 0 1 0 0 4.99 2.495 2.495 0 0 0 0-4.99M13 16.995a3.995 3.995 0 1 1 7.99 0 3.995 3.995 0 0 1-7.99 0" clipRule="evenodd" /></svg>
  );
};