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

function IconCaretRightComponent(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-caret-right${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 d="M18.1609 10.1366C16.8244 9.11057 14.8999 10.0709 14.8999 11.764L14.8999 36.2362C14.8999 37.9292 16.8244 38.8896 18.1609 37.8635L34.1 25.6274C35.1665 24.8086 35.1665 23.1915 34.1 22.3727L18.1609 10.1366Z"/></svg>;
}

const IconCaretRight = React.forwardRef(IconCaretRightComponent);
export default IconCaretRight;
