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

function IconSendComponent(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-send${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 24 24" {...rest} ref={ref}><g><path d="M20.645 1.275 1.175 7.266C-.18 7.68-.427 9.492.768 10.256l5.75 3.679a1.666 1.666 0 0 0 1.97-.13l7.178-6.06c.39-.327.915.197.586.587l-6.055 7.178a1.662 1.662 0 0 0-.13 1.968l3.677 5.751c.763 1.194 2.575.948 2.992-.405l5.988-19.47a1.664 1.664 0 0 0-2.08-2.079Z"/></g></svg>;
}

const IconSend = React.forwardRef(IconSendComponent);
export default IconSend;
