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

function IconSpeech2textComponent(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-speech2text${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 22 22" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M17.5967 4C18.4451 4 19.1336 4.68771 19.1338 5.53613V17.5967C19.1338 18.4453 18.4453 19.1338 17.5967 19.1338H5.53613C4.68773 19.1336 4 18.4451 4 17.5967V11.8682C4 11.592 4.22386 11.3682 4.5 11.3682H5.03613C5.31227 11.3682 5.53613 11.592 5.53613 11.8682V17.5967H17.5967V5.53613H13.2988C13.0867 5.53613 12.9141 5.36449 12.9141 5.15234V4.38379C12.9142 4.1718 13.0868 4 13.2988 4H17.5967ZM14.4951 9C14.6745 9.0001 14.8203 9.15146 14.8203 9.33789V10.0127C14.8203 10.1991 14.6745 10.3505 14.4951 10.3506H12.2197V16.0908C12.2197 16.2773 12.074 16.4287 11.8945 16.4287H11.2451C11.0656 16.4287 10.9199 16.2773 10.9199 16.0908V10.3506H8.64453C8.46523 10.3504 8.32031 10.199 8.32031 10.0127V9.33789C8.32031 9.15155 8.46523 9.00023 8.64453 9H14.4951ZM6.2002 1.59961C6.36579 1.59971 6.5 1.73477 6.5 1.90039V9.2998C6.5 9.46542 6.36579 9.5995 6.2002 9.59961H5.2998C5.13421 9.5995 5 9.46542 5 9.2998V1.90039C5 1.73477 5.13421 1.59971 5.2998 1.59961H6.2002ZM8.7002 3C8.86573 3.00011 8.99989 3.13427 9 3.2998V7.2998C9 7.46542 8.86579 7.5995 8.7002 7.59961H7.7998C7.63421 7.5995 7.5 7.46542 7.5 7.2998V3.2998C7.50011 3.13427 7.63427 3.00011 7.7998 3H8.7002ZM3.7002 3.75C3.86573 3.75011 3.99989 3.88427 4 4.0498V6.4502C3.99989 6.61573 3.86573 6.74989 3.7002 6.75H2.7998C2.63427 6.74989 2.50011 6.61573 2.5 6.4502V4.0498C2.50011 3.88427 2.63427 3.75011 2.7998 3.75H3.7002ZM11.2002 4C11.3657 4.00011 11.4999 4.13427 11.5 4.2998V5.7002C11.4999 5.86573 11.3657 5.99989 11.2002 6H10.2998C10.1343 5.99989 10.0001 5.86573 10 5.7002V4.2998C10.0001 4.13427 10.1343 4.00011 10.2998 4H11.2002Z"/></svg>;
}

const IconSpeech2text = React.forwardRef(IconSpeech2textComponent);
export default IconSpeech2text;
