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

function IconAudioComponent(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-audio${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 28 28" {...rest} ref={ref}><path fill={useCurrentColor ? 'currentColor' : '#FF617E'} fillRule="evenodd" d="M7 1.75a3.5 3.5 0 0 0-3.5 3.5v17.5a3.5 3.5 0 0 0 3.5 3.5h14a3.5 3.5 0 0 0 3.5-3.5V10.5l-8.75-8.75H7Z" clipRule="evenodd"/><path fill={useCurrentColor ? 'currentColor' : '#FFB0BF'} d="m15.75 1.75 8.75 8.75h-5.25a3.5 3.5 0 0 1-3.5-3.5V1.75Z"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="m19.853 12.558-5.237.243c-.633.017-1.273.521-1.436 1.13l-1.398 5.216-.019.072s-.29-.342-1.096-.433c-1.189-.14-2.36.525-2.617 1.48-.256.957.514 1.791 1.703 1.932 1.19.14 2.267-.519 2.523-1.476l1.211-4.519c.113-.42.646-.471.646-.471l4.641-.248s.523-.038.4.418l-.97 3.622s-.367-.37-1.174-.485c-1.184-.162-2.35.481-2.607 1.437-.256.957.509 1.814 1.692 1.975 1.183.163 2.35-.48 2.606-1.437l1.978-7.383c.163-.608-.213-1.09-.846-1.073Z"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} fillRule="evenodd" d="M10.379 12.39c.172.3.271.656.271 1.037 0 1.093-.814 1.973-1.825 1.973C7.815 15.4 7 14.52 7 13.427c0-1.092.814-1.972 1.825-1.972h.019l-1.51-4.094c-.138-.37.03-.795.373-.944a.13.13 0 0 1 .025-.01.053.053 0 0 0 .024-.01l2.325-.764c.305-.106.638.053.776.37l.284.669c.147.35.01.764-.314.923a.47.47 0 0 1-.034.016.452.452 0 0 0-.035.015l-1.59.573c-.147.053-.215.212-.176.371 0 .01 0 .01.01.022l1.377 3.797Z" clipRule="evenodd" opacity=".7"/></svg>;
}

const IconAudio = React.forwardRef(IconAudioComponent);
export default IconAudio;
