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

function IconLoudspeakerComponent(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-loudspeaker${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M43 4a1 1 0 011 1v34a1 1 0 01-1 1h-2a1 1 0 01-1-1v-2.8L24 33v8.716a2 2 0 01-2.264 1.982l-11-1.467A2 2 0 019 40.25V30l-3.392-.678A2 2 0 014 27.36V14.722a2 2 0 011.703-1.977L40 7.599V5a1 1 0 011-1h2zM13 30.883v7.615l7 .933V32.29l-7-1.406zM8 16.445l32-4.8V32.12l-32-6.4v-9.276z"/></svg>;
}

const IconLoudspeaker = React.forwardRef(IconLoudspeakerComponent);
export default IconLoudspeaker;
