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

function IconWechatComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = false, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hkgai';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-wechat${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill="none" {...rest} ref={ref}><path d="M0 24C0 10.745 10.745 0 24 0s24 10.745 24 24-10.745 24-24 24S0 37.255 0 24z" fill={useCurrentColor ? 'currentColor' : '#45B035'}/><path fillRule="evenodd" clipRule="evenodd" d="M30.723 19.296c-.159-.009-.319-.01-.48-.01-5.748 0-10.41 3.905-10.41 8.725 0 .789.129 1.553.363 2.28a13.495 13.495 0 01-4.384-.464l-.194-.056-4.132 2.104 1.104-3.458-.104-.067C9.758 26.604 8 23.853 8 20.758c0-5.279 5.116-9.558 11.428-9.558 5.717 0 10.454 3.51 11.295 8.096zm-15.272-.276c-.886 0-1.605-.697-1.605-1.554 0-.859.719-1.553 1.605-1.553.887 0 1.607.694 1.607 1.553 0 .857-.72 1.554-1.607 1.554zm7.954-3.107c.886 0 1.604.694 1.604 1.553 0 .857-.718 1.554-1.604 1.554-.887 0-1.604-.697-1.604-1.554 0-.859.717-1.553 1.604-1.553z" fill={useCurrentColor ? 'currentColor' : '#fff'}/><path fillRule="evenodd" clipRule="evenodd" d="M30.33 36.142c-5.333 0-9.657-3.615-9.657-8.075 0-4.458 4.324-8.073 9.657-8.073 5.33 0 9.653 3.615 9.653 8.073 0 2.616-1.487 4.94-3.79 6.416l-.089.055.933 2.923-3.489-1.78s-.11.034-.165.048a11.35 11.35 0 01-3.053.413zm-4.717-10.856c0-.724.608-1.312 1.356-1.312.75 0 1.357.588 1.357 1.312 0 .726-.608 1.315-1.357 1.315-.748 0-1.356-.589-1.356-1.315zm6.72 0c0-.724.605-1.312 1.354-1.312.75 0 1.356.588 1.356 1.312 0 .726-.606 1.315-1.356 1.315-.748 0-1.355-.589-1.355-1.315z" fill={useCurrentColor ? 'currentColor' : '#fff'}/></svg>;
}

const IconWechat = React.forwardRef(IconWechatComponent);
export default IconWechat;
