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

function IconText2videoComponent(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-text2video${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="M16.1797 9.2373C16.6756 8.8731 17.3586 8.89147 17.834 9.28223L17.9326 9.37109L19.5918 11.0312C20.1311 11.5705 20.1169 12.4491 19.5605 12.9707L12.1279 19.9395C11.9148 20.139 11.6338 20.25 11.3418 20.25H9.59961C8.85432 20.2498 8.25019 19.6457 8.25 18.9004V16.8555C8.25 16.5289 8.38877 16.2171 8.63184 15.999L16.0762 9.32129L16.1797 9.2373ZM9.75 17.0107V18.75H11.2031L16.0986 14.1592L14.5986 12.6592L9.75 17.0107ZM15.4268 2.7002C16.4208 2.70033 17.2266 3.50597 17.2266 4.5V6.32324C17.2266 6.76499 16.8685 7.12389 16.4268 7.12402C15.9849 7.12402 15.627 6.76507 15.627 6.32324V4.5C15.627 4.38963 15.5371 4.29994 15.4268 4.2998H4.25C4.13954 4.2998 4.0498 4.38954 4.0498 4.5V15.6768C4.04994 15.7871 4.13963 15.877 4.25 15.877H5.60254L5.68457 15.8809C6.08805 15.9218 6.40332 16.2625 6.40332 16.6768C6.40319 17.0909 6.08799 17.4318 5.68457 17.4727L5.60254 17.4766H4.25C3.25597 17.4766 2.45033 16.6708 2.4502 15.6768V4.5C2.4502 3.50589 3.25589 2.7002 4.25 2.7002H15.4268ZM15.7168 11.6562L17.1934 13.1328L18.4219 11.9824L16.9707 10.5322L15.7168 11.6562ZM8.22266 6.9248C8.32344 6.92489 8.42129 6.9595 8.5 7.02246L11.7881 9.65332C11.9798 9.80666 12.0108 10.0857 11.8574 10.2773C11.8369 10.303 11.8137 10.3262 11.7881 10.3467L8.5 12.9775C8.30833 13.1309 8.02834 13.0999 7.875 12.9082C7.8121 12.8295 7.77833 12.7317 7.77832 12.6309V7.36914C7.77833 7.12369 7.9772 6.9248 8.22266 6.9248Z"/></svg>;
}

const IconText2video = React.forwardRef(IconText2videoComponent);
export default IconText2video;
