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

function IconUnconstraintComponent(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-unconstraint${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 18 18" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><g clipPath="url(#svg_0af2381755__clip0_2798_6896)"><path d="M16.125 7.27487C16.125 5.61801 14.7819 4.27487 13.125 4.27487L10.9687 4.27487C10.7616 4.27487 10.5937 4.44276 10.5937 4.64987L10.5938 5.39987C10.5937 5.60697 10.7616 5.77487 10.9688 5.77487L13.125 5.77487C13.9534 5.77487 14.625 6.44644 14.625 7.27487L14.625 10.7249C14.625 11.5533 13.9534 12.2249 13.125 12.2249L10.9688 12.2249C10.7616 12.2249 10.5938 12.3928 10.5938 12.5999V13.3499C10.5937 13.557 10.7616 13.7249 10.9688 13.7249L13.125 13.7249C14.7819 13.7249 16.125 12.3817 16.125 10.7249L16.125 7.27487ZM7.03125 5.77487C7.23836 5.77487 7.40625 5.60697 7.40625 5.39987L7.40625 4.64987C7.40625 4.44276 7.23836 4.27487 7.03125 4.27487L4.875 4.27487C3.21815 4.27487 1.875 5.61801 1.875 7.27487L1.875 10.7249C1.875 12.3817 3.21814 13.7249 4.875 13.7249L7.03125 13.7249C7.23836 13.7249 7.40625 13.557 7.40625 13.3499V12.5999C7.40625 12.3928 7.23836 12.2249 7.03125 12.2249L4.875 12.2249C4.04657 12.2249 3.375 11.5533 3.375 10.7249L3.375 7.27487C3.375 6.44644 4.04657 5.77487 4.875 5.77487L7.03125 5.77487Z"/></g><defs><clipPath id="svg_0af2381755__clip0_2798_6896"><path d="M0 0H18V18H0z"/></clipPath></defs></svg>;
}

const IconUnconstraint = React.forwardRef(IconUnconstraintComponent);
export default IconUnconstraint;
