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

function IconWorkflowConditionComponent(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-workflow-condition${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}><rect width="24" height="24" fill={useCurrentColor ? 'currentColor' : '#FF9600'} rx="7"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M6 4.5a1 1 0 0 1 1 1v13a1 1 0 1 1-2 0v-13a1 1 0 0 1 1-1Zm12 0a1 1 0 1 1 0 2h-6v4h6a1 1 0 1 1 0 2h-6v6a1 1 0 1 1-2 0v-13a1 1 0 0 1 1-1h7Z"/></svg>;
}

const IconWorkflowCondition = React.forwardRef(IconWorkflowConditionComponent);
export default IconWorkflowCondition;
