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

function IconGraphSchemaComponent(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-schema${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="M1.5 3.91A2.41 2.41 0 0 1 3.91 1.5h8.18a2.41 2.41 0 0 1 2.41 2.41v8.18a2.41 2.41 0 0 1-2.41 2.41H3.91a2.41 2.41 0 0 1-2.41-2.41V3.91Zm2.41-1.095c-.605 0-1.095.49-1.095 1.095v8.18c0 .605.49 1.095 1.095 1.095h8.18c.605 0 1.095-.49 1.095-1.095V3.91c0-.605-.49-1.095-1.095-1.095H3.91Zm7.742 8.106a.73.73 0 0 1-.73.73H8.73a.73.73 0 0 1 0-1.46h2.191a.73.73 0 0 1 .73.73ZM5.79 5.097A.73.73 0 0 0 4.758 6.13l1.505 1.505L4.758 9.14a.73.73 0 0 0 1.033 1.033L7.812 8.15a.73.73 0 0 0 0-1.032L5.791 5.097Z" clipRule="evenodd"/></svg>;
}

const IconGraphSchema = React.forwardRef(IconGraphSchemaComponent);
export default IconGraphSchema;
