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

function IconTokenConsumptionComponent(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-token_consumption${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 fillRule="evenodd" clipRule="evenodd" d="M16.0612 8.67852L17.9658 10.667C18.0114 10.7146 18.0114 10.7917 17.9658 10.8393C17.9439 10.8622 17.9143 10.875 17.8833 10.875L16.6504 10.8752C15.8091 14.3191 12.703 16.875 9 16.875C5.29684 16.875 2.19067 14.3189 1.34955 10.8749L2.90515 10.8748C3.70577 13.4807 6.13166 15.375 9 15.375C11.8682 15.375 14.294 13.4809 15.0947 10.8752L13.9917 10.875C13.9272 10.875 13.875 10.8205 13.875 10.7532C13.875 10.7209 13.8873 10.6899 13.9092 10.667L15.8137 8.67852C15.8821 8.60716 15.9929 8.60716 16.0612 8.67852ZM9.66101 5.625C9.82528 5.625 9.95845 5.7586 9.95845 5.9234V8.10782L11.3729 8.32677C11.4261 8.33501 11.4761 8.35759 11.5176 8.39211C11.6439 8.49739 11.6613 8.68552 11.5564 8.8123L8.69679 12.2672C8.64028 12.3355 8.55641 12.375 8.46796 12.375C8.30369 12.375 8.17052 12.2414 8.17052 12.0766V9.77539L6.61681 9.47862C6.56239 9.46823 6.51195 9.44279 6.47116 9.40518C6.35022 9.29366 6.34229 9.10489 6.45345 8.98356L9.44202 5.72147C9.49835 5.65999 9.57778 5.625 9.66101 5.625ZM0.116673 7.125H4.00833C4.03927 7.125 4.06895 7.13783 4.09083 7.16068C4.12988 7.20145 4.13546 7.26395 4.10756 7.31093L4.09083 7.33295L2.18625 9.32148C2.12645 9.38392 2.03413 9.39172 1.9662 9.3449L1.93875 9.32148L0.0341726 7.33295C0.0122923 7.31011 0 7.27912 0 7.24682C0 7.18915 0.0383776 7.14084 0.0899207 7.12822L0.116673 7.125H4.00833H0.116673ZM9 1.125C12.7032 1.125 15.8093 3.68106 16.6504 7.12514L15.0949 7.12517C14.2942 4.51933 11.8683 2.625 9 2.625C6.1318 2.625 3.706 4.51915 2.90526 7.12479L1.34964 7.12476C2.1909 3.68087 5.29697 1.125 9 1.125Z"/></svg>;
}

const IconTokenConsumption = React.forwardRef(IconTokenConsumptionComponent);
export default IconTokenConsumption;
