import React, { FC } from 'react';

import css from './index.module.css';

export interface VideoProps {
  videoId: string;
}

const Video: FC<VideoProps> = ({ videoId }) => (
  <div className={css.video} data-testid="Video">
    <iframe
      className={css.video__element}
      src={`https://www.youtube.com/embed/${videoId}`}
      frameBorder="0"
      allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
      allowFullScreen
    ></iframe>
  </div>
);

export default Video;
