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

function IconArrowDownwardComponent(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-downward${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 3.675a.598.598 0 0 1 .846 0l.423.423a.598.598 0 0 1 0 .845L6.425 8.325a.596.596 0 0 1-.655.13.596.596 0 0 1-.195-.13L2.193 4.943a.598.598 0 0 1 0-.845l.423-.423a.598.598 0 0 1 .845 0L6 6.214l2.538-2.539Z" clipRule="evenodd"/></svg>;
}

const IconArrowDownward = React.forwardRef(IconArrowDownwardComponent);
export default IconArrowDownward;
