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

function IconMermaidCloseComponent(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-mermaid-close${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 17 18" {...rest} ref={ref}><path d="M12.996 5.445a.5.5 0 0 1 0 .707L9.728 9.419l3.268 3.268a.5.5 0 0 1 0 .707l-.408.408a.5.5 0 0 1-.707 0l-3.268-3.267-3.395 3.395a.5.5 0 0 1-.707 0l-.409-.408a.5.5 0 0 1 0-.707l3.396-3.396-3.396-3.395a.5.5 0 0 1 0-.707l.409-.408a.5.5 0 0 1 .707 0l3.395 3.395 3.268-3.267a.5.5 0 0 1 .707 0l.408.408Z"/></svg>;
}

const IconMermaidClose = React.forwardRef(IconMermaidCloseComponent);
export default IconMermaidClose;
