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

function IconArrowUpwardsComponent(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-upwards${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 12 12" {...rest} ref={ref}><path fillRule="evenodd" d="M8.538 8.325a.598.598 0 0 0 .846 0l.423-.423a.598.598 0 0 0 0-.845L6.425 3.675a.596.596 0 0 0-.655-.13.596.596 0 0 0-.195.13L2.193 7.057a.598.598 0 0 0 0 .845l.423.423a.598.598 0 0 0 .845 0L6 5.786l2.538 2.539Z" clipRule="evenodd"/></svg>;
}

const IconArrowUpwards = React.forwardRef(IconArrowUpwardsComponent);
export default IconArrowUpwards;
