import { VideoPlayer } from "@scandic-hotels/design-system/VideoPlayer"

import type { VideoBlock } from "@scandic-hotels/trpc/types/blocks"

interface VideoBlockProps extends Pick<VideoBlock, "video"> {}

export function VideoBlock({ video }: VideoBlockProps) {
  if (!video) {
    return null
  }

  return <VideoPlayer {...video} />
}
