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

function IconSpeakerComponent(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-speaker${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 12 12" {...rest} ref={ref}><path d="M6 .5a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11Zm0 1a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Zm.318 1.256a.5.5 0 0 1 .707 0 4.573 4.573 0 0 1 1.343 3.241 4.572 4.572 0 0 1-1.343 3.24.5.5 0 1 1-.707-.707 3.572 3.572 0 0 0 1.05-2.533c0-.99-.4-1.885-1.05-2.534a.5.5 0 0 1 0-.707ZM4.875 4.199a.501.501 0 0 1 .707 0c.46.46.744 1.096.744 1.797 0 .702-.285 1.339-.744 1.798a.5.5 0 0 1-.707-.707c.28-.28.451-.665.451-1.09 0-.426-.172-.811-.451-1.09a.5.5 0 0 1 0-.708Zm-1.09 1.214a.584.584 0 1 1-.003 1.168.584.584 0 0 1 .002-1.168Z"/></svg>;
}

const IconSpeaker = React.forwardRef(IconSpeakerComponent);
export default IconSpeaker;
