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

function IconKnowledgeWorkflowComponent(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-knowledge_workflow${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 20 20" {...rest} ref={ref}><rect width="20" height="20" fill={useCurrentColor ? 'currentColor' : '#F6BB45'} rx="6"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} fillRule="evenodd" d="M5.91 5.333h8.18c.324 0 .588.262.588.584v9.342a.588.588 0 0 1-.81.54l-3.724-1.626a.593.593 0 0 0-.451.003l-3.554 1.61a.588.588 0 0 1-.816-.538V5.917c0-.322.263-.584.588-.584ZM8.53 8.84a.293.293 0 0 0-.294.292v.583c0 .161.131.292.294.292h2.94c.163 0 .295-.13.295-.292v-.583a.293.293 0 0 0-.295-.292H8.53Z" clipRule="evenodd"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M4.458 7.433v-2.8c0-.257.21-.466.467-.466h10.15c.258 0 .467.209.467.466v2.8a.467.467 0 0 1-.467.467h-.397V5.917a.586.586 0 0 0-.589-.584H5.911a.586.586 0 0 0-.589.584V7.9h-.397a.467.467 0 0 1-.467-.467Z" opacity=".5"/></svg>;
}

const IconKnowledgeWorkflow = React.forwardRef(IconKnowledgeWorkflowComponent);
export default IconKnowledgeWorkflow;
