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

function IconMessageNodesComponent(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 || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-message-nodes${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 24 24" {...rest} ref={ref}><g><path fill={useCurrentColor ? 'currentColor' : '#34B1FF'} d="M16.8 0H7.2A7.2 7.2 0 0 0 0 7.2v9.6A7.2 7.2 0 0 0 7.2 24h9.6a7.2 7.2 0 0 0 7.2-7.2V7.2A7.2 7.2 0 0 0 16.8 0Z"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M16.257 4.8H7.743C6.166 4.8 4.8 6.28 4.8 7.987v6.375c0 1.708 1.366 3.187 2.943 3.187h.315s0 .114.105.114L9.32 19.03c.21.228.525.228.63 0l1.051-1.252.106-.114h5.15c1.576 0 2.943-1.48 2.943-3.187v-6.49c0-1.707-1.366-3.187-2.943-3.187Zm-8.304 7.627c-.63 0-1.05-.57-1.05-1.252 0-.683.525-1.252 1.155-1.252.631 0 1.157.569 1.157 1.252-.106.683-.631 1.252-1.262 1.252Zm3.994 0c-.63 0-1.156-.57-1.156-1.252 0-.683.526-1.252 1.156-1.252.631 0 1.157.569 1.157 1.252s-.526 1.252-1.157 1.252Zm4.1 0c-.631 0-1.157-.57-1.157-1.252 0-.683.526-1.252 1.157-1.252.63 0 1.156.569 1.156 1.252-.105.683-.63 1.252-1.156 1.252Z"/></g></svg>;
}

const IconMessageNodes = React.forwardRef(IconMessageNodesComponent);
export default IconMessageNodes;
