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

function IconUploadingPngComponent(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-png${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="M11.315 17.855a.5.5 0 0 1 .895 0l1.533 3.065-2.02 4.04h-3.15a.5.5 0 0 1-.448-.723l3.19-6.382Z" opacity=".8"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="m12.925 24.236 4.79-9.582a.5.5 0 0 1 .895 0l4.79 9.582a.5.5 0 0 1-.446.724h-9.582a.5.5 0 0 1-.447-.724Z"/><circle cx="11.603" cy="11.52" r="2.24" fill={useCurrentColor ? 'currentColor' : '#fff'} opacity=".8"/><path fill={useCurrentColor ? 'currentColor' : '#BBC1ED'} d="m18 2 10 10h-6a4 4 0 0 1-4-4V2Z"/></svg>;
}

const IconUploadingPng = React.forwardRef(IconUploadingPngComponent);
export default IconUploadingPng;
