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

export const IconLink16 = 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="M7.019 5.365c.555.04 1.1.2 1.589.467s.916.638 1.25 1.084a.75.75 0 1 1-1.202.898 2.4 2.4 0 0 0-1.745-.953 2.4 2.4 0 0 0-1.007.145c-.32.12-.613.309-.855.55l-1.88 1.881a2.4 2.4 0 0 0-.669 1.68c.006.625.26 1.227.701 1.67a2.4 2.4 0 0 0 1.671.7 2.4 2.4 0 0 0 1.679-.667l1.07-1.07a.75.75 0 0 1 1.06 1.06l-1.083 1.085a3.9 3.9 0 0 1-2.738 1.092 3.9 3.9 0 0 1-2.72-1.14A3.9 3.9 0 0 1 1 11.13 3.9 3.9 0 0 1 2.093 8.39l1.894-1.894c.394-.394.872-.7 1.393-.896a3.9 3.9 0 0 1 1.639-.235M11.142 1a3.895 3.895 0 0 1 2.766 6.598l-1.895 1.894c-.394.394-.87.7-1.393.896a3.9 3.9 0 0 1-1.638.235c-.555-.04-1.1-.2-1.588-.467a3.9 3.9 0 0 1-1.251-1.084.756.756 0 0 1 .151-1.05.753.753 0 0 1 1.05.15c.204.274.469.503.768.668.3.163.636.262.977.287s.687-.026 1.007-.145c.32-.12.614-.309.856-.55l1.881-1.881A2.393 2.393 0 0 0 9.45 3.168L8.372 4.239a.75.75 0 0 1-1.06-.003.756.756 0 0 1 .003-1.06l1.088-1.083A3.9 3.9 0 0 1 11.142 1"
                    clipRule="evenodd"
                />
            </svg>
        );
    }
);
