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

function IconEventComponent(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-event${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' : '#00B3EF'} d="M16 0H8a8 8 0 0 0-8 8v8a8 8 0 0 0 8 8h8a8 8 0 0 0 8-8V8a8 8 0 0 0-8-8Z"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} fillRule="evenodd" d="M5.5 5A1.5 1.5 0 0 0 4 6.5v9.4a1.5 1.5 0 0 0 1.5 1.5h3.108a2.042 2.042 0 0 1 .227-1.804l.43-.669V12.89c0-3.15 2.593-5.659 5.735-5.659a5.755 5.755 0 0 1 5 2.884V6.5A1.5 1.5 0 0 0 18.5 5h-13Zm.75 2a.75.75 0 0 0 0 1.5h3a.75.75 0 0 0 0-1.5h-3Zm-.75 3.75a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 0 1.5h-1.5a.75.75 0 0 1-.75-.75Z" clipRule="evenodd" opacity=".7"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} fillRule="evenodd" d="M19.904 16.408a.6.6 0 0 1-.516.92h-8.776a.6.6 0 0 1-.516-.92l.442-.687a1.42 1.42 0 0 0 .227-.77V12.89c0-2.297 1.896-4.159 4.235-4.159 2.339 0 4.235 1.862 4.235 4.16v2.061c0 .273.079.54.227.77l.442.687Zm-6.056 1.643a.84.84 0 1 0 0 1.679h2.31a.84.84 0 0 0 0-1.679h-2.31Z" clipRule="evenodd"/></g></svg>;
}

const IconEvent = React.forwardRef(IconEventComponent);
export default IconEvent;
