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

function IconVoiceCloseComponent(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-voice-close${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="M12.5 3h-.66l-.094.004a.998.998 0 0 0-.516.204L5.39 7.7l-.064.054A.999.999 0 0 0 5 8.493v7.014l.004.085a.998.998 0 0 0 .387.708l5.84 4.492.077.054c.158.1.343.154.532.154h.66l.075-.003A1 1 0 0 0 13.5 20V4l-.003-.075A1 1 0 0 0 12.5 3ZM7 8.985l4.5-3.461v12.953L7 15.015v-6.03ZM3.5 8.5A.5.5 0 0 0 3 8H2a.5.5 0 0 0-.5.5v7a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-7Zm15.474 2.06-1.413-1.414a.5.5 0 0 0-.707 0l-.708.708a.5.5 0 0 0 0 .707l1.415 1.414-1.415 1.414a.5.5 0 0 0 0 .707l.708.707.047.042a.5.5 0 0 0 .66-.042l1.413-1.414 1.415 1.414a.5.5 0 0 0 .707 0l.707-.707a.5.5 0 0 0 0-.707l-1.414-1.414 1.414-1.414a.5.5 0 0 0 0-.707l-.707-.708-.047-.041a.5.5 0 0 0-.66.041l-1.415 1.414Z" clipRule="evenodd"/></svg>;
}

const IconVoiceClose = React.forwardRef(IconVoiceCloseComponent);
export default IconVoiceClose;
