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

function IconUploadingDocComponent(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-doc${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' : '#0085F9'} 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="M22.4 16H9.6a.6.6 0 0 0-.6.6v1.8a.6.6 0 0 0 .6.6h12.8a.6.6 0 0 0 .6-.6v-1.8a.6.6 0 0 0-.6-.6Z" opacity=".9"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M16.737 22H9.494c-.273 0-.494.269-.494.6v1.8c0 .331.221.6.494.6h7.243c.273 0 .494-.269.494-.6v-1.8c0-.331-.221-.6-.494-.6Z" opacity=".8"/><path fill={useCurrentColor ? 'currentColor' : '#80C2FC'} d="m18 2 10 10h-6a4 4 0 0 1-4-4V2Z"/></svg>;
}

const IconUploadingDoc = React.forwardRef(IconUploadingDocComponent);
export default IconUploadingDoc;
