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

function IconStopComponent(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-stop${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 24 24" {...rest} ref={ref}><path fillRule="evenodd" d="M4.246 4.222c4.29-4.295 11.247-4.295 15.537 0 4.291 4.296 4.291 11.26 0 15.557-4.29 4.295-11.246 4.295-15.537 0-4.29-4.296-4.29-11.26 0-15.557Zm2.157.746 12.635 12.65c2.827-3.533 2.605-8.706-.667-11.981a8.982 8.982 0 0 0-11.968-.669ZM4.991 6.383l12.635 12.65a8.982 8.982 0 0 1-11.967-.669C2.387 15.09 2.165 9.916 4.99 6.383Z" clipRule="evenodd"/></svg>;
}

const IconStop = React.forwardRef(IconStopComponent);
export default IconStop;
