import React, { ReactNode } from "react" export function Video({ video = "", isBusy = false, progress = 0, status = "", error = "", children = undefined, }: { video: string isBusy: boolean progress: number status: string error: ReactNode children?: ReactNode } = { video: "", isBusy: false, progress: 0, status: "", error: "", children: undefined, }) { const placeholder =
{ error ? {error} : No video yet }
const hasVideoContent = Boolean(video && video?.length > 128) return ( <>{ children ? children : isBusy ?

{progress}%

{ status ? status : error ? {error} : placeholder // to prevent layout changes }

: hasVideoContent ?