import React, { ForwardedRef, useContext } from 'react';
import { OriginIconProps } from '../type';
import { Context } from '../context';

function IconHMessageComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = true, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'font';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-H-Message${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 24 24" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M12 5C7.46776 5 4.00002 8.24148 4.00002 12C4.00002 13.3518 4.43801 14.619 5.20894 15.6991C5.40234 15.97 5.44822 16.3195 5.33133 16.6312L4.56804 18.6666L7.54857 18.0705C7.76062 18.0281 7.98071 18.0555 8.17583 18.1488C9.30816 18.6899 10.6098 19 12 19C16.5323 19 20 15.7585 20 12C20 8.24148 16.5323 5 12 5ZM2.00002 12C2.00002 6.92196 6.59115 3 12 3C17.4089 3 22 6.92196 22 12C22 17.078 17.4089 21 12 21C10.4348 21 8.94859 20.6761 7.62323 20.0952L3.19613 20.9806C2.84009 21.0518 2.47343 20.9244 2.23822 20.6478C2.003 20.3712 1.9362 19.9888 2.06369 19.6489L3.27874 16.4087C2.4678 15.1108 2.00002 13.6065 2.00002 12Z"/></svg>;
}

const IconHMessage = React.forwardRef(IconHMessageComponent);
export default IconHMessage;
