import { forwardRef, useMemo } from 'react';
import { IconProps } from './types';

export const IconTriangle16 = forwardRef<SVGSVGElement, IconProps>(
    ({ color = 'currentColor', title, ...props }, svgRef) => {
        const titleId = useMemo(
            () =>
                title
                    ? 'title-' + Math.random().toString(36).substr(2, 9)
                    : undefined,
            [title]
        );
        return (
            <svg
                xmlns="http://www.w3.org/2000/svg"
                width={16}
                height={16}
                fill="none"
                viewBox="0 0 16 16"
                aria-hidden={!title}
                ref={svgRef}
                aria-labelledby={titleId}
                {...props}
            >
                {title ? <title id={titleId}>{title}</title> : null}
                <path
                    fill={color}
                    fillRule="evenodd"
                    d="M8 1.25a2.1 2.1 0 0 1 1.785.996l.002.004 5.682 9.383a2.07 2.07 0 0 1-.752 2.832c-.314.183-.671.281-1.034.285H2.317a2.1 2.1 0 0 1-1.79-1.045 2.07 2.07 0 0 1 .005-2.071l.006-.011L6.213 2.25l.002-.004A2.103 2.103 0 0 1 8 1.25m0 1.5a.6.6 0 0 0-.506.278v.002l-5.669 9.364a.566.566 0 0 0 .213.775.6.6 0 0 0 .292.081h11.34a.583.583 0 0 0 .58-.577.57.57 0 0 0-.075-.28L8.505 3.03v-.002A.601.601 0 0 0 8 2.75"
                    clipRule="evenodd"
                />
            </svg>
        );
    }
);
