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

function IconUploadFileComponent(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-upload_file${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 18 18" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M13.1621 9.92383C13.2989 9.7872 13.5194 9.78722 13.6572 9.92383L16.1377 12.4043C16.2745 12.5411 16.2745 12.7636 16.1377 12.9004L15.6426 13.3965C15.61 13.4292 15.5709 13.4559 15.5283 13.4736C15.4859 13.4912 15.4404 13.4999 15.3945 13.5C15.3485 13.5 15.3023 13.4913 15.2598 13.4736C15.2171 13.4559 15.1781 13.4292 15.1455 13.3965L14.1152 12.3652V15.9902C14.1152 16.0831 14.0784 16.1726 14.0127 16.2383C13.947 16.3038 13.8575 16.3408 13.7646 16.3408H13.0625C12.9699 16.3407 12.881 16.3037 12.8154 16.2383C12.7498 16.1726 12.713 16.0831 12.7129 15.9902V12.3564L11.6729 13.3965C11.6073 13.4618 11.5183 13.4989 11.4258 13.499C11.3331 13.499 11.2434 13.4619 11.1777 13.3965L10.6816 12.9004C10.6491 12.8678 10.6231 12.8287 10.6055 12.7861C10.5879 12.7437 10.5791 12.6983 10.5791 12.6523C10.5791 12.6064 10.5879 12.561 10.6055 12.5186C10.6231 12.476 10.6491 12.4368 10.6816 12.4043L13.1621 9.92383ZM16.5938 1.66504C16.9044 1.66504 17.1562 1.91688 17.1562 2.22754V8.61133C17.156 8.84363 16.9677 9.03219 16.7354 9.03223H15.999C15.7667 9.03223 15.5774 8.84365 15.5771 8.61133V3.24316H2.42285V13.7676H8.8418C9.0742 13.7676 9.26254 13.9561 9.2627 14.1885V14.9258C9.26252 15.1581 9.07419 15.3467 8.8418 15.3467H1.40625C1.09567 15.3467 0.843886 15.0947 0.84375 14.7842V2.22754C0.84375 1.91688 1.09559 1.66504 1.40625 1.66504H16.5938ZM8.375 9.375C8.58211 9.375 8.75 9.54289 8.75 9.75V10.5C8.75 10.7071 8.58211 10.875 8.375 10.875H5.375C5.16789 10.875 5 10.7071 5 10.5V9.75C5 9.54289 5.16789 9.375 5.375 9.375H8.375ZM10.625 6C10.8321 6 11 6.16789 11 6.375V7.125C11 7.33211 10.8321 7.5 10.625 7.5H5.375C5.16789 7.5 5 7.33211 5 7.125V6.375C5 6.16789 5.16789 6 5.375 6H10.625Z"/></svg>;
}

const IconUploadFile = React.forwardRef(IconUploadFileComponent);
export default IconUploadFile;
