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

function IconGraphSWindowComponent(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-S-window${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 fillRule="evenodd" d="m16.776 17.378.59-.59a.417.417 0 0 0 0-.589l-4.037-4.035h2.467c.185 0 .253-.02.32-.056a.38.38 0 0 0 .158-.158c.036-.067.056-.135.056-.32v-.599c0-.186-.02-.253-.056-.32a.378.378 0 0 0-.157-.158c-.068-.037-.136-.056-.321-.056H11.33a.833.833 0 0 0-.834.833v4.466c0 .186.02.253.056.321.036.068.09.121.158.158.067.036.135.055.32.055h.599c.186 0 .253-.019.32-.055a.378.378 0 0 0 .158-.158c.037-.068.056-.135.056-.32v-2.443l4.024 4.024a.417.417 0 0 0 .589 0ZM8.616 9.52c.46 0 .833-.373.833-.833V4.104a.417.417 0 0 0-.416-.417h-.834a.417.417 0 0 0-.416.417v2.5L3.8 2.622a.417.417 0 0 0-.59 0l-.589.59a.417.417 0 0 0 0 .589l4.053 4.053H4.033a.417.417 0 0 0-.417.417v.833c0 .23.186.417.417.417h4.583Z" clipRule="evenodd"/></svg>;
}

const IconGraphSWindow = React.forwardRef(IconGraphSWindowComponent);
export default IconGraphSWindow;
