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

export const IconFlag16 = 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}
                    d="M5.375 1c1.134 0 2.073.388 2.87.718l.042.017c.835.346 1.524.622 2.338.622.896 0 1.454-.154 1.764-.282a1.7 1.7 0 0 0 .34-.186.75.75 0 0 1 1.271.54v8.142a.75.75 0 0 1-.21.522c-.896-.866-.01-.008-.002 0l-.032.033-.052.046q-.06.053-.162.123a3 3 0 0 1-.58.309c-.51.21-1.265.396-2.337.396-1.134 0-2.072-.388-2.87-.718l-.042-.017c-.835-.346-1.524-.622-2.338-.622-.896 0-1.454.154-1.764.282l-.111.05v3.275a.75.75 0 0 1-1.5 0V2.429a.75.75 0 0 1 .21-.522c.896.866.01.008.002 0l.032-.033.052-.046q.06-.052.162-.123c.135-.093.325-.203.58-.309C3.547 1.186 4.302 1 5.374 1m0 1.5c-.896 0-1.454.154-1.764.282l-.111.05v6.547c.474-.136 1.09-.236 1.875-.236 1.134 0 2.072.389 2.87.718l.042.017c.835.345 1.524.622 2.338.622.896 0 1.454-.154 1.764-.282l.111-.05V3.621c-.474.136-1.09.236-1.875.236-1.134 0-2.072-.389-2.87-.718l-.042-.017C6.878 2.777 6.189 2.5 5.375 2.5"
                />
            </svg>
        );
    }
);
