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

function IconRollbackingInProgressComponent(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-rollbacking-in-progress${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 24 25" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><switch><g><path fillRule="evenodd" clipRule="evenodd" d="M13.7998 6.30669C12.4998 5.90669 11.0998 5.95669 9.79984 6.45669C8.49984 6.95669 7.39984 7.80669 6.64984 8.95669C5.89984 10.1067 5.54984 11.4567 5.59984 12.8567C5.64984 14.2567 6.19984 15.5567 7.09984 16.6067C7.99984 17.6567 9.19984 18.4067 10.5498 18.7067C11.8998 19.0067 13.2998 18.9067 14.5498 18.3067C15.4498 17.9067 16.4998 18.3067 16.8998 19.2067C17.2998 20.1067 16.8998 21.1567 15.9998 21.5567C14.0498 22.4067 11.8498 22.6567 9.74984 22.1567C7.64984 21.6567 5.74984 20.5067 4.34984 18.9067C2.99984 17.3067 2.14984 15.2567 1.99984 13.1067C1.89984 10.9567 2.44984 8.80669 3.59984 7.00669C4.79984 5.20669 6.49984 3.80669 8.54984 3.10669C10.5498 2.35669 12.7998 2.30669 14.8498 2.90669C16.8998 3.50669 18.7498 4.75669 19.9998 6.45669C21.2998 8.20669 21.9998 10.2567 21.9998 12.4567C21.9998 13.4567 21.1998 14.2567 20.1998 14.2567C19.1998 14.2567 18.3998 13.4567 18.3998 12.4567C18.3998 11.0567 17.9498 9.75669 17.1498 8.60669C16.2998 7.50669 15.1498 6.70669 13.7998 6.30669Z" fill={useCurrentColor ? 'currentColor' : 'url(#svg_9c7419a22c__a)'}/><linearGradient id="svg_9c7419a22c__a" x1="13.215" y1="7.364" x2="10.715" y2="16.739" gradientUnits="userSpaceOnUse"><stop stopColor="#DB373F"/><stop offset="1" stopColor="#DB373F" stopOpacity="0"/></linearGradient><path fillRule="evenodd" clipRule="evenodd" d="M13.7998 6.30669C12.4998 5.90669 11.0998 5.95669 9.79984 6.45669C8.49984 6.95669 7.39984 7.80669 6.64984 8.95669C5.89984 10.1067 5.54984 11.4567 5.59984 12.8567C5.64984 14.2567 6.19984 15.5567 7.09984 16.6067C7.99984 17.6567 9.19984 18.4067 10.5498 18.7067C11.8998 19.0067 13.2998 18.9067 14.5498 18.3067C15.4498 17.9067 16.4998 18.3067 16.8998 19.2067C17.2998 20.1067 16.8998 21.1567 15.9998 21.5567C14.0498 22.4067 11.8498 22.6567 9.74984 22.1567C7.64984 21.6567 5.74984 20.5067 4.34984 18.9067C2.99984 17.3067 2.14984 15.2567 1.99984 13.1067C1.89984 10.9567 2.44984 8.80669 3.59984 7.00669C4.79984 5.20669 6.49984 3.80669 8.54984 3.10669C10.5498 2.35669 12.7998 2.30669 14.8498 2.90669C16.8998 3.50669 18.7498 4.75669 19.9998 6.45669C21.2998 8.20669 21.9998 10.2567 21.9998 12.4567C21.9998 13.4567 21.1998 14.2567 20.1998 14.2567C19.1998 14.2567 18.3998 13.4567 18.3998 12.4567C18.3998 11.0567 17.9498 9.75669 17.1498 8.60669C16.2998 7.50669 15.1498 6.70669 13.7998 6.30669Z" fill={useCurrentColor ? 'currentColor' : 'url(#svg_9c7419a22c__b)'}/><linearGradient id="svg_9c7419a22c__b" x1="-.574" y1="10.023" x2="18.801" y2="13.773" gradientUnits="userSpaceOnUse"><stop stopColor="#EC9498"/><stop offset="1" stopColor="#EC9498" stopOpacity="0"/></linearGradient></g><animateTransform attributeName="transform" begin="0s" dur="2s" type="rotate" from="0 12 12.5" to="360 12 12.5" repeatCount="indefinite"/></switch></svg>;
}

const IconRollbackingInProgress = React.forwardRef(IconRollbackingInProgressComponent);
export default IconRollbackingInProgress;
