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

export type SustainabilityIconProps = 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 SustainabilityIcon = ({ title, size, color, ...props }: SustainabilityIconProps) => {
  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.75 10.5A7.25 7.25 0 0 1 12 3.25h8.75V12a7.25 7.25 0 0 1-7.25 7.25H5.81l-1.78 1.78-1.06-1.06 1.78-1.78zm1.5 6.19 2.25-2.25V9.75H10v3.19l2.255-2.255V6.5h1.5v2.685L16.22 6.72l1.06 1.06-2.465 2.465H17.5v1.5h-4.185L11.06 14h3.19v1.5H9.56l-2.25 2.25h6.19A5.75 5.75 0 0 0 19.25 12V4.75H12a5.75 5.75 0 0 0-5.75 5.75z" /></svg>
  );
};