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

function IconErrorFillComponent(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-error-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 12.402 3 24s9.402 21 21 21 21-9.402 21-21zm-13.024-6.444l-1.485-1.484a1.2 1.2 0 00-1.697 0l-4.775 4.772-4.77-4.77a1.2 1.2 0 00-1.698 0l-1.485 1.484a1.2 1.2 0 000 1.697l4.77 4.772-4.77 4.772a1.2 1.2 0 000 1.698l1.485 1.485a1.2 1.2 0 001.697 0l4.77-4.775 4.776 4.776a1.2 1.2 0 001.697 0l1.485-1.485a1.2 1.2 0 000-1.697l-4.774-4.774 4.774-4.774a1.2 1.2 0 000-1.697z"/></svg>;
}

const IconErrorFill = React.forwardRef(IconErrorFillComponent);
export default IconErrorFill;
