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

export const IconStar16 = 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 .5c.282.001.543.16.67.412l2.063 4.094 4.623.662a.76.76 0 0 1 .608.514.76.76 0 0 1-.197.771l-3.335 3.18.787 4.487a.76.76 0 0 1-.294.735.76.76 0 0 1-.788.062L8 13.287l-4.137 2.13a.751.751 0 0 1-1.082-.797l.786-4.487-3.335-3.18a.75.75 0 0 1 .411-1.285l4.623-.662L7.33.912A.75.75 0 0 1 8 .5M6.43 6.031a.76.76 0 0 1-.564.405l-3.48.498 2.506 2.39c.18.173.265.426.222.672l-.596 3.396 3.139-1.616a.76.76 0 0 1 .686 0l3.138 1.616-.595-3.396a.75.75 0 0 1 .221-.672l2.507-2.39-3.48-.498a.75.75 0 0 1-.564-.405L8 2.916z"
                    clipRule="evenodd"
                />
            </svg>
        );
    }
);
