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

function IconUploadingJsonComponent(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-json${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' : '#B36DF2'} 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="M13.695 15.519h-.691c-.364 0-.546.09-.635.193-.096.112-.184.37-.184.867v1.309c0 .568-.085 1.057-.28 1.441l-.09.16a1.76 1.76 0 0 1-.5.511c.198.134.366.304.5.512l.09.159c.195.384.28.873.28 1.441v1.309c0 .496.088.755.184.867l.037.038c.1.087.28.156.598.156h.691V26.3h-.731c-.876 0-1.587-.173-2.077-.573-.52-.422-.73-1.152-.73-2.073v-1.386c0-.3-.027-.527-.07-.69l-.048-.144a.555.555 0 0 0-.296-.31c-.156-.068-.4-.116-.75-.124l-.293-.008v-1.985L8.993 19c.36-.008.606-.058.758-.128a.556.556 0 0 0 .293-.313c.068-.168.112-.436.112-.827v-1.386c0-.921.211-1.65.73-2.073.491-.4 1.202-.573 2.078-.573h.731v1.819Zm5.341-1.819c.876 0 1.587.173 2.077.573.52.422.73 1.152.73 2.073v1.386c0 .391.045.66.113.827a.557.557 0 0 0 .293.313c.152.07.398.12.758.128l.293.007v1.985l-.293.008c-.35.008-.594.056-.75.124a.555.555 0 0 0-.296.31l-.048.143c-.043.164-.07.39-.07.69v1.387c0 .92-.211 1.65-.73 2.073-.49.4-1.2.573-2.077.573h-.731v-1.818h.691c.318 0 .498-.07.598-.156l.037-.038c.096-.112.183-.371.183-.867v-1.309c0-.568.086-1.057.28-1.441l.091-.16c.134-.207.302-.377.5-.511a1.762 1.762 0 0 1-.5-.512l-.09-.159c-.195-.384-.28-.873-.28-1.441v-1.309c0-.496-.088-.755-.184-.867-.09-.103-.271-.193-.635-.193h-.691V13.7h.731Zm-7.135 10.074.012.094a2.983 2.983 0 0 1-.023-.262l.011.168Zm8.258-2.301h.001Zm1.71-.44a.927.927 0 0 0-.184.282.859.859 0 0 1 .184-.281Zm.192-.147Zm-1.453-1.341.01.01a1.477 1.477 0 0 1-.094-.108l.084.098Zm1.515-.4c.103.047.228.084.374.11h.001a1.543 1.543 0 0 1-.374-.11h-.001Zm-.445-.473.014.031-.013-.031-.016-.045.015.045Zm-.126-.652.006.067a4.261 4.261 0 0 1-.005-.067l-.01-.288.009.288Zm-1.438-1.44-.004-.185-.008-.125c.008.096.012.199.012.31Zm1.43-.234-.009-.302v-.007c.005.099.009.202.009.309Zm-.621-1.84c.03.024.059.051.087.079l-.011-.013-.075-.066a1.683 1.683 0 0 0-.001 0Z" opacity=".9"/><path fill={useCurrentColor ? 'currentColor' : '#D9B6F9'} d="m18 2 10 10h-6a4 4 0 0 1-4-4V2Z"/></svg>;
}

const IconUploadingJson = React.forwardRef(IconUploadingJsonComponent);
export default IconUploadingJson;
