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

function IconCustomComponent(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-Custom${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_90589c47f0__clip0_450_21664)"><path fillRule="evenodd" clipRule="evenodd" d="M9 0.75C13.5563 0.75 17.25 4.44365 17.25 9C17.25 9.2529 17.2386 9.50315 17.2163 9.75025L15.7088 9.75016C15.736 9.50386 15.75 9.25356 15.75 9C15.75 5.27208 12.7279 2.25 9 2.25C5.27208 2.25 2.25 5.27208 2.25 9C2.25 12.7279 5.27208 15.75 9 15.75C9.25356 15.75 9.50386 15.736 9.75016 15.7088L9.75025 17.2163C9.50315 17.2386 9.2529 17.25 9 17.25C4.44365 17.25 0.75 13.5563 0.75 9C0.75 4.44365 4.44365 0.75 9 0.75ZM12.4369 11.082C12.5615 10.8812 12.8324 10.8151 13.0421 10.9344L17.0338 13.205C17.1235 13.256 17.1915 13.3359 17.2256 13.4304C17.3053 13.6511 17.1831 13.8919 16.9526 13.9682L15.5384 14.4367L16.6906 16.3479C16.8125 16.5502 16.7402 16.8088 16.5289 16.9256L16.0448 17.1933C15.8336 17.31 15.5636 17.2408 15.4416 17.0385L14.2894 15.1273L13.1595 16.0653C13.0805 16.1309 12.9798 16.1675 12.8753 16.1687C12.6314 16.1713 12.4315 15.9842 12.4286 15.7506L12.375 11.3028C12.3741 11.2252 12.3955 11.1488 12.4369 11.082ZM9.75 5.625C9.75 5.41789 9.58211 5.25 9.375 5.25H8.625C8.41789 5.25 8.25 5.41789 8.25 5.625V8.25H5.625C5.41789 8.25 5.25 8.41789 5.25 8.625V9.375C5.25 9.58211 5.41789 9.75 5.625 9.75H8.25V12.375C8.25 12.5821 8.41789 12.75 8.625 12.75H9.375C9.58211 12.75 9.75 12.5821 9.75 12.375V9.75H12.375C12.5821 9.75 12.75 9.58211 12.75 9.375V8.625C12.75 8.41789 12.5821 8.25 12.375 8.25H9.75V5.625Z"/></g><defs><clipPath id="svg_90589c47f0__clip0_450_21664"><path d="M0 0H18V18H0z"/></clipPath></defs></svg>;
}

const IconCustom = React.forwardRef(IconCustomComponent);
export default IconCustom;
