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

function IconGraphFoldingPanelComponent(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-graph-folding-panel${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 20 20" {...rest} ref={ref}><path d="M15.032 3.22c.966 0 1.75.783 1.75 1.75v10.062a1.75 1.75 0 0 1-1.75 1.75H4.969a1.75 1.75 0 0 1-1.75-1.75V4.969c0-.966.784-1.75 1.75-1.75h10.063ZM8.469 15.47h6.563a.438.438 0 0 0 .437-.438V4.969a.438.438 0 0 0-.437-.437H8.469v10.937ZM4.97 4.531a.437.437 0 0 0-.437.437v10.063c0 .241.196.437.437.437h2.188V4.532H4.969Z"/></svg>;
}

const IconGraphFoldingPanel = React.forwardRef(IconGraphFoldingPanelComponent);
export default IconGraphFoldingPanel;
