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

export const IconOctagon24 = 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={24}
                height={24}
                fill="none"
                viewBox="0 0 24 24"
                aria-hidden={!title}
                ref={svgRef}
                aria-labelledby={titleId}
                {...props}
            >
                {title ? <title id={titleId}>{title}</title> : null}
                <path
                    fill={color}
                    d="M15.415 1c.73 0 1.429.29 1.944.806l4.835 4.835A2.75 2.75 0 0 1 23 8.585v6.83c0 .73-.29 1.429-.806 1.944l-4.835 4.835a2.75 2.75 0 0 1-1.944.806h-6.83a2.75 2.75 0 0 1-1.944-.806L1.806 17.36A2.75 2.75 0 0 1 1 15.415v-6.83c0-.73.29-1.429.806-1.944L6.64 1.806A2.75 2.75 0 0 1 8.585 1zm-6.83 1.5c-.332 0-.65.132-.884.366L2.866 7.701a1.25 1.25 0 0 0-.366.884v6.83c0 .332.132.65.366.884l4.835 4.835c.235.234.552.366.884.366h6.83c.332 0 .65-.132.884-.366l4.835-4.835a1.25 1.25 0 0 0 .366-.884v-6.83c0-.332-.132-.65-.366-.884l-4.835-4.835a1.25 1.25 0 0 0-.884-.366z"
                />
            </svg>
        );
    }
);
