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

function IconAgentVoiceSwitchComponent(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-agent_voice_switch${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 20 20" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M12.7884 4.74361L15.1455 6.97973L3.20669 6.97973C2.74645 6.97973 2.37335 7.35282 2.37335 7.81306C2.37335 8.2733 2.74645 8.64639 3.20668 8.64639L16.1901 8.6464C17.3196 8.6464 17.8699 7.26697 17.0504 6.48955L13.9355 3.53448C13.6016 3.21772 13.0741 3.23161 12.7574 3.56551C12.4406 3.8994 12.4545 4.42685 12.7884 4.74361ZM7.1696 15.2594L4.83728 13.0198L16.6253 13.0198C17.0856 13.0198 17.4587 12.6467 17.4587 12.1864C17.4587 11.7262 17.0856 11.3531 16.6253 11.3531L3.80179 11.3531C2.6759 11.3531 2.12391 12.7249 2.93601 13.5047L6.01523 16.4615C6.3472 16.7803 6.87472 16.7696 7.1935 16.4376C7.51227 16.1057 7.50157 15.5781 7.1696 15.2594Z"/></svg>;
}

const IconAgentVoiceSwitch = React.forwardRef(IconAgentVoiceSwitchComponent);
export default IconAgentVoiceSwitch;
