import cn from "classnames";
import React from "react";

import "./AttractionMedia.css";

interface VideoMediaProps {
  url: string;
  watermarkUrl?: string;
}

export const VideoMedia = ({ url, watermarkUrl }: VideoMediaProps) => (
  <>
    <video
      src={url}
      className={cn("widget-video", {
        "media-with-watermark": watermarkUrl !== null,
      })}
      autoPlay
      loop
      muted
    />
    {watermarkUrl && (
      <img src={watermarkUrl} alt="Watermark" className="watermark" />
    )}
  </>
);
