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

function IconRotateLeftComponent(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-rotate-left${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M43.003 22h-2a1 1 0 01-.993-.883L40.003 21v-1a8 8 0 00-7.751-7.996l-.25-.004h-7.001L25 14a1 1 0 01-1.6.8l-5.333-4a1 1 0 010-1.6l5.333-4A1 1 0 0125 6v2h7.003c6.525 0 11.834 5.209 11.996 11.695l.004.305v1a1 1 0 01-.884.993l-.116.007zM6 44a2 2 0 01-2-2V21a2 2 0 012-2h25a2 2 0 012 2v21a2 2 0 01-2 2H6zm23-4V23H8v17h21z"/></svg>;
}

const IconRotateLeft = React.forwardRef(IconRotateLeftComponent);
export default IconRotateLeft;
