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

function IconUpgradeEngineComponent(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-upgrade_engine${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 16 16" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><rect width="16" height="16" rx="4" fill={useCurrentColor ? 'currentColor' : '#309256'}/><path fillRule="evenodd" clipRule="evenodd" d="M8.04451 2.97569C8.05536 2.98505 8.0655 2.99519 8.07486 3.00604L12.5681 8.21505C12.6175 8.28403 12.6493 8.36611 12.6603 8.45556C12.6618 8.46682 12.6626 8.47787 12.6636 8.48913C12.6642 8.49977 12.6665 8.50959 12.6665 8.52024C12.6665 8.52638 12.6649 8.53231 12.6647 8.53846C12.6644 8.56384 12.6616 8.58901 12.6554 8.6277C12.6294 8.7632 12.5521 8.88703 12.4295 8.96154C12.4143 8.97075 12.3983 8.97648 12.3827 8.98364C12.3749 8.98733 12.3673 8.99142 12.3593 8.9947C12.3439 9.00084 12.3282 9.00554 12.3124 9.01005C12.2931 9.01578 12.2736 9.02069 12.2472 9.02479C12.2246 9.02806 12.2021 9.03195 12.1785 9.03195H9.73862V12.64C9.73862 12.8158 9.59297 12.9583 9.4133 12.9583H6.29471C6.11504 12.9583 5.96939 12.8158 5.96939 12.64V9.03195H3.52948C3.50587 9.03195 3.48342 9.02806 3.45473 9.02417C3.43443 9.02069 3.41491 9.01578 3.39558 9.01005C3.37977 9.00554 3.36416 9.00084 3.34874 8.9947C3.34073 8.99142 3.33312 8.98733 3.32531 8.98364C3.3097 8.97648 3.29369 8.97075 3.27847 8.96154C3.15589 8.88703 3.07859 8.7632 3.05048 8.61419C3.04638 8.58901 3.04365 8.56384 3.04326 8.53846C3.04307 8.53231 3.0415 8.52638 3.0415 8.52024C3.0415 8.50959 3.04385 8.49977 3.04443 8.48913C3.04541 8.47787 3.04619 8.46682 3.04775 8.45556C3.05868 8.36611 3.09069 8.28403 3.13988 8.21505L7.63315 3.00604C7.73836 2.88407 7.92254 2.87048 8.04451 2.97569Z" fill={useCurrentColor ? 'currentColor' : '#fff'}/></svg>;
}

const IconUpgradeEngine = React.forwardRef(IconUpgradeEngineComponent);
export default IconUpgradeEngine;
