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

function IconThumbUpComponent(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-thumb-up${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 48 48" {...rest} ref={ref}><path d="M9 17v26H5V17h4ZM24.817 5.558a3 3 0 0 1 4.034-.673l.125.087 2.535 1.87a8 8 0 0 1 2.725 9.298l-.33.862h6.359c2.707 0 4.632 2.632 3.811 5.211L38.128 40.91a3 3 0 0 1-2.86 2.09H12V17h4.016l8.801-11.443Zm15.447 15.444h-12.17L30.5 14.71a4 4 0 0 0-1.362-4.648l-1.748-1.29-9.406 12.229H16v18h18.537l5.727-18Z"/></svg>;
}

const IconThumbUp = React.forwardRef(IconThumbUpComponent);
export default IconThumbUp;
