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

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

    const prefix = prefixFromProps || prefixFromContext || 'hkgai';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-infoCircle${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 18 22" fill="none" xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M1.5 11C1.5 6.85786 4.85786 3.5 9 3.5C13.1421 3.5 16.5 6.85786 16.5 11C16.5 15.1421 13.1421 18.5 9 18.5C4.85786 18.5 1.5 15.1421 1.5 11ZM8.25 13.25V14.75H9.75V13.25H8.25ZM9.75 12.5L9.75 7.25H8.25L8.25 12.5H9.75Z" fill={useCurrentColor ? 'currentColor' : '#FF7D00'}/></svg>;
}

const IconInfoCircle = React.forwardRef(IconInfoCircleComponent);
export default IconInfoCircle;
