--- // Renders nothing unless both id and embedId are provided. import CaptureScript from '../components/CaptureScript.astro'; interface Props { id?: string; type?: string; embedId?: string | number; } const { id, type = 'youtube', embedId } = Astro.props; const enabled = Boolean(id && embedId); const playerId = `player-${id}`; const playerSelector = `#player-${id}`; --- { enabled && (
) } { enabled && ( ) }