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

function IconVideoComponent(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-video${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'currentColor'} viewBox="0 0 28 28" {...rest} ref={ref}><path fill={useCurrentColor ? 'currentColor' : '#FB0'} 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' : '#FFDD80'} 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="M15.05 14.3a1 1 0 0 0-1-1h-5.7a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h5.7a1 1 0 0 0 1-1v-5Z"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M20.65 13.534a.5.5 0 0 0-.777-.416l-3.2 2.133a.5.5 0 0 0-.223.417v2.264a.5.5 0 0 0 .223.416l3.2 2.134a.5.5 0 0 0 .777-.416v-6.532Z" opacity=".7"/></svg>;
}

const IconVideo = React.forwardRef(IconVideoComponent);
export default IconVideo;
