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

function IconPlusComponent(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-plus${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 24 24" {...rest} ref={ref}><path fillRule="evenodd" d="M11.694 3c-.229 0-.386.024-.552.113a.861.861 0 0 0-.355.355c-.09.167-.113.324-.113.552v6.653H4.02c-.228 0-.385.025-.552.114a.861.861 0 0 0-.355.355c-.089.166-.113.324-.113.552v.612c0 .229.024.386.113.552a.861.861 0 0 0 .355.355c.167.09.324.113.552.113h6.653v6.654c0 .228.025.385.114.552a.861.861 0 0 0 .355.355c.166.089.324.113.552.113h.612c.229 0 .386-.024.552-.113a.861.861 0 0 0 .355-.355c.09-.167.113-.324.113-.552v-6.654h6.654c.228 0 .385-.024.552-.113a.861.861 0 0 0 .355-.355c.089-.166.113-.324.113-.552v-.612c0-.229-.024-.386-.113-.552a.861.861 0 0 0-.355-.355c-.167-.09-.324-.113-.552-.113h-6.654V4.02c0-.228-.024-.385-.113-.552a.861.861 0 0 0-.355-.355c-.166-.089-.324-.113-.552-.113h-.612Z" clipRule="evenodd"/></svg>;
}

const IconPlus = React.forwardRef(IconPlusComponent);
export default IconPlus;
