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

function IconUploadingHtmlComponent(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 || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-uploading-html${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 32 32" {...rest} ref={ref}><path fill={useCurrentColor ? 'currentColor' : '#7883DB'} fillRule="evenodd" d="M8 2a4 4 0 0 0-4 4v20a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4V12L18 2H8Z" clipRule="evenodd"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M9.728 24.961a.2.2 0 0 1-.32-.16v-2.78a.4.4 0 0 1 .16-.32l5.44-4.062a.1.1 0 0 1 .16.08v2.98a.4.4 0 0 1-.16.32l-5.28 3.942Z" opacity=".8"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M9.728 13.358a.2.2 0 0 0-.32.16v2.78a.4.4 0 0 0 .16.321l5.44 4.061a.1.1 0 0 0 .16-.08v-2.979a.4.4 0 0 0-.16-.32l-5.28-3.942Zm12.261 8.55h-5.162a.61.61 0 0 0-.619.6v1.61c0 .33.277.6.62.6h5.16a.61.61 0 0 0 .62-.6v-1.61a.61.61 0 0 0-.62-.6Z"/><path fill={useCurrentColor ? 'currentColor' : '#BBC1ED'} d="m18 2 10 10h-6a4 4 0 0 1-4-4V2Z"/></svg>;
}

const IconUploadingHtml = React.forwardRef(IconUploadingHtmlComponent);
export default IconUploadingHtml;
