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

function IconUpComponent(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-up${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 12 12" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M8.12322 7.94456C8.31848 8.13982 8.63506 8.13982 8.83032 7.94456L9.18388 7.591C9.37914 7.39574 9.37914 7.07916 9.18388 6.8839L6.35545 4.05547C6.25729 3.95732 6.12849 3.9085 5.99984 3.90903C5.87119 3.9085 5.74239 3.95732 5.64423 4.05547L2.8158 6.8839C2.62054 7.07916 2.62054 7.39574 2.8158 7.591L3.16936 7.94456C3.36462 8.13982 3.6812 8.13982 3.87646 7.94456L5.99984 5.82118L8.12322 7.94456Z"/></svg>;
}

const IconUp = React.forwardRef(IconUpComponent);
export default IconUp;
