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

function IconGraphThumbnailComponent(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-thumbnail${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 16 16" {...rest} ref={ref}><path fillRule="evenodd" d="M13.75.25a2 2 0 0 1 2 2v11.5a2 2 0 0 1-2 2H2.25a2 2 0 0 1-2.001-2V2.25c0-1.104.897-2 2.001-2h11.5Zm-11.5 1.5a.5.5 0 0 0-.5.5v6h4a2 2 0 0 1 2 2v4h6a.5.5 0 0 0 .5-.5V2.25a.5.5 0 0 0-.5-.5H2.25Zm-.5 12a.5.5 0 0 0 .5.5h4v-4a.5.5 0 0 0-.5-.5h-4v4Z" clipRule="evenodd"/></svg>;
}

const IconGraphThumbnail = React.forwardRef(IconGraphThumbnailComponent);
export default IconGraphThumbnail;
