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

function IconPauseComponent(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-pause${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 20 20" {...rest} ref={ref}><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M7.813 2.188c.345 0 .625.28.625.624v14.376c0 .345-.28.625-.626.625H4.376a.625.625 0 0 1-.625-.625V2.813c0-.346.28-.626.625-.626h3.438Zm7.812 0c.345 0 .625.28.625.624v14.376c0 .345-.28.625-.625.625h-3.438a.625.625 0 0 1-.624-.625V2.813c0-.346.28-.626.624-.626h3.438Z"/></svg>;
}

const IconPause = React.forwardRef(IconPauseComponent);
export default IconPause;
