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

function IconObsComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = false, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-obs${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 16 16" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M4.10127 12.9284C2.26033 12.9284 0.767944 11.436 0.767944 9.59505C0.767944 7.75409 2.26033 6.26172 4.10127 6.26172C5.94224 6.26172 7.43461 7.75409 7.43461 9.59505C7.43461 9.61112 7.43451 9.62719 7.43427 9.64322H9.07784V12.9284H4.19014V12.9272C4.16061 12.928 4.13101 12.9284 4.10127 12.9284Z" fill={useCurrentColor ? 'currentColor' : '#AEB8CA'}/><path fillRule="evenodd" clipRule="evenodd" d="M7.86313 12.918C5.00387 12.7423 2.73926 10.3677 2.73926 7.4642C2.73926 4.4464 5.18567 2 8.20347 2C10.9755 2 13.2654 4.06413 13.62 6.73923C14.5868 7.3228 15.2332 8.38343 15.2332 9.59507C15.2332 11.436 13.7408 12.9284 11.8999 12.9284H8.20347H8.1287C8.03933 12.9284 7.95073 12.9249 7.86313 12.918Z" fill={useCurrentColor ? 'currentColor' : '#8D99AE'}/><path d="M11.5837 9.42777C11.6888 9.53277 11.6144 9.7123 11.4659 9.7123H10.0369C9.96327 9.7123 9.90357 9.772 9.90357 9.84564V11.6919C9.93391 12.3794 10.4922 12.9273 11.1766 12.9273C11.1924 12.9273 11.2082 12.9271 11.2239 12.9265V12.9276H9.90097V12.9271H8.22177C7.48537 12.9271 6.88844 12.3302 6.88844 11.5938V9.84564C6.88844 9.772 6.82874 9.7123 6.75511 9.7123H5.36464C5.21614 9.7123 5.14177 9.53277 5.24681 9.42777L8.17961 6.49604C8.30977 6.3659 8.52077 6.3659 8.65094 6.49604L11.5837 9.42777Z" fill={useCurrentColor ? 'currentColor' : '#F6F8FA'}/></svg>;
}

const IconObs = React.forwardRef(IconObsComponent);
export default IconObs;
