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

function IconNextStepComponent(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-next-step${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 20 20" {...rest} ref={ref}><path d="M13.31 3.11a.375.375 0 0 1 .53 0l3.44 3.44a.749.749 0 0 1 0 1.06l-3.44 3.44a.375.375 0 0 1-.53 0l-.529-.528a.374.374 0 0 1 0-.53l2.162-2.163H7.916c-1.447 0-3.743 1.483-3.743 3.743 0 1.272.727 2.302 1.62 2.96.298.22.614.398.928.53.418.175.833.268 1.195.268h3.092c.207 0 .375.168.375.375v.734a.375.375 0 0 1-.375.374H7.74a5.24 5.24 0 0 1 0-10.482h7.204L12.781 4.17a.376.376 0 0 1 0-.53l.53-.53Z"/></svg>;
}

const IconNextStep = React.forwardRef(IconNextStepComponent);
export default IconNextStep;
