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

function IconWarningFillComponent(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 || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-warning-fill${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M45 24c0 11.598-9.402 21-21 21S3 35.598 3 24 12.402 3 24 3s21 9.402 21 21zm-18.323 6.825c0-.644-.522-1.166-1.166-1.166h-3.034c-.644 0-1.166.522-1.166 1.166v3.034c0 .644.522 1.166 1.166 1.166h3.034c.644 0 1.166-.522 1.166-1.166v-3.034zm0-17.134c0-.645-.522-1.167-1.166-1.167h-3.034c-.644 0-1.166.522-1.166 1.167v12.273c0 .645.522 1.167 1.166 1.167h3.034c.644 0 1.166-.522 1.166-1.167V13.691z"/></svg>;
}

const IconWarningFill = React.forwardRef(IconWarningFillComponent);
export default IconWarningFill;
