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

export const IconKey16 = 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="M10.354 0a5.62 5.62 0 0 1 3.995 1.653 5.68 5.68 0 0 1 1.602 4.743v.001a5.68 5.68 0 0 1-2.798 4.152 5.66 5.66 0 0 1-4.55.468l-.637.637c-.201.21-.48.327-.769.327h-.675v.556a1.2 1.2 0 0 1-.33.8l-.007.009a1.18 1.18 0 0 1-.844.354h-.548v.64c.008.288-.1.56-.293.767l-.673.673a.75.75 0 0 1-.53.22H.75a.75.75 0 0 1-.75-.75v-2.558c0-.199.08-.39.22-.53L4.982 7.4a5.68 5.68 0 0 1 .466-4.554A5.68 5.68 0 0 1 9.603.05c.25-.035.503-.05.75-.05m0 1.5q-.28 0-.548.036l-.003.001A4.18 4.18 0 0 0 6.75 3.591a4.18 4.18 0 0 0-.222 3.67.81.81 0 0 1-.173.888L1.5 13.003V14.5h1.486l.307-.308v-1.04c0-.519.42-.952.951-.952h.778v-.768c0-.518.42-.95.952-.95h1.044l.841-.843a.808.808 0 0 1 .714-.219l.024.005q.072.015.142.044a4.15 4.15 0 0 0 3.671-.223 4.18 4.18 0 0 0 2.054-3.05 4.18 4.18 0 0 0-1.176-3.482A4.12 4.12 0 0 0 10.354 1.5M10.75 3a2.248 2.248 0 1 1-2.078 3.11l-.001-.003a2.24 2.24 0 0 1 .488-2.45A2.24 2.24 0 0 1 10.751 3m0 1.5a.74.74 0 0 0-.53.219h-.002a.748.748 0 0 0 1.06 1.06.747.747 0 0 0-.528-1.28"
                />
            </svg>
        );
    }
);
