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

function IconArrowRightCornerComponent(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-arrow-right-corner${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 10 10" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M2.51727 1.11111C2.10328 1.11111 1.76768 1.45086 1.76768 1.86995C1.76768 2.28905 2.10328 2.62879 2.51727 2.62879H6.23486L1.33064 7.59347C1.0379 7.88982 1.0379 8.37029 1.33064 8.66663C1.62337 8.96298 2.09799 8.96298 2.39073 8.66663L7.38805 3.60771C7.38859 3.60716 7.38913 3.60661 7.38966 3.60607V7.56125C7.38966 7.98034 7.72527 8.32009 8.13926 8.32009C8.55325 8.32009 8.88886 7.98034 8.88886 7.56125V2.24937C8.88886 1.62073 8.38545 1.11111 7.76446 1.11111H2.51727Z"/></svg>;
}

const IconArrowRightCorner = React.forwardRef(IconArrowRightCornerComponent);
export default IconArrowRightCorner;
