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

function IconThumbsUpComponent(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 || 'hkgai';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-ThumbsUp${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 20 20" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M18.5156 6.05234C18.3103 5.81972 18.0578 5.63344 17.7749 5.50588C17.4921 5.37832 17.1853 5.3124 16.875 5.3125H12.8125V4.375C12.8115 3.46364 12.449 2.58989 11.8045 1.94546C11.1601 1.30103 10.2864 0.938534 9.375 0.9375C9.20096 0.93752 9.03037 0.985984 8.88232 1.07746C8.73427 1.16895 8.6146 1.29983 8.53672 1.45547L5.67031 7.1875H2.5C2.0856 7.1875 1.68817 7.35212 1.39515 7.64515C1.10212 7.93817 0.9375 8.3356 0.9375 8.75V15.625C0.9375 16.0394 1.10212 16.4368 1.39515 16.7299C1.68817 17.0229 2.0856 17.1875 2.5 17.1875H15.9375C16.4707 17.1874 16.9854 16.9926 17.3851 16.6397C17.7847 16.2868 18.0417 15.8001 18.1078 15.2711L19.0453 7.77109C19.0839 7.46343 19.0566 7.15108 18.9653 6.85476C18.874 6.55844 18.7207 6.28493 18.5156 6.05234ZM2.8125 9.0625H5.3125V15.3125H2.8125V9.0625ZM17.1875 7.53906L16.25 15.0391C16.2404 15.115 16.2033 15.1848 16.1457 15.2352C16.0881 15.2856 16.014 15.3131 15.9375 15.3125H7.1875V8.34609L9.90781 2.90625C10.2095 3.01569 10.4702 3.21537 10.6544 3.47815C10.8386 3.74093 10.9375 4.05407 10.9375 4.375V6.25C10.9375 6.49864 11.0363 6.7371 11.2121 6.91291C11.3879 7.08873 11.6264 7.1875 11.875 7.1875H16.875C16.9195 7.18715 16.9636 7.19633 17.0044 7.21442C17.0451 7.2325 17.0814 7.25908 17.111 7.29238C17.1406 7.32567 17.1627 7.3649 17.1759 7.40745C17.1891 7.44999 17.1931 7.49487 17.1875 7.53906Z"/></svg>;
}

const IconThumbsUp = React.forwardRef(IconThumbsUpComponent);
export default IconThumbsUp;
