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

function IconMessageFillComponent(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-message-fill${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 18 18" {...rest} ref={ref}><path fillRule="evenodd" d="M9 2C12.866 2 16 5.13401 16 9C16 12.866 12.866 16 9 16H2.66667C2.29848 16 2 15.7015 2 15.3333V9C2 5.13401 5.13401 2 9 2ZM9.33333 9.66667H6C5.81591 9.66667 5.66667 9.81591 5.66667 10V10.6667C5.66667 10.8508 5.81591 11 6 11H9.33333C9.51743 11 9.66667 10.8508 9.66667 10.6667V10C9.66667 9.81591 9.51743 9.66667 9.33333 9.66667ZM12 7H6C5.81591 7 5.66667 7.14924 5.66667 7.33333V8C5.66667 8.18409 5.81591 8.33333 6 8.33333H12C12.1841 8.33333 12.3333 8.18409 12.3333 8V7.33333C12.3333 7.14924 12.1841 7 12 7Z" clipRule="evenodd"/></svg>;
}

const IconMessageFill = React.forwardRef(IconMessageFillComponent);
export default IconMessageFill;
