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

function IconDropComponent(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-drop${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 12 13" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M10.4569 4.96256C10.7188 4.63517 10.4857 4.15021 10.0664 4.15021L1.93346 4.15021C1.5142 4.15021 1.28112 4.63517 1.54302 4.96256L5.60952 10.0457C5.80968 10.2959 6.19022 10.2959 6.39038 10.0457L10.4569 4.96256Z"/></svg>;
}

const IconDrop = React.forwardRef(IconDropComponent);
export default IconDrop;
