---
/**
 * YouTube embed component for Portable Text
 *
 * Wraps astro-embed's YouTube component, extracting props from the PT block node.
 * astro-portabletext passes `node` (not `value`) for custom type components.
 */
import { YouTube as AstroYouTube } from "astro-embed";
import type { YouTubeBlock } from "../schemas.js";

interface Props {
	node: YouTubeBlock;
}

const { node } = Astro.props;
const { id, poster, posterQuality, params, playlabel, title } = node;
---

<AstroYouTube
	id={id}
	poster={poster}
	posterQuality={posterQuality}
	params={params}
	playlabel={playlabel}
	title={title}
/>
