import { type JSX, splitProps, createSignal, createEffect, createMemo, on, onMount, Show, } from 'solid-js'; import { cn } from '../utils/cn'; import { Play, Video, ExternalLink, TriangleAlert } from 'lucide-solid'; import type { CardEvent } from '../primitives/card-contract'; import { type EmbedCardData, type ResolvedEmbed, resolveEmbed, watchUrl, providerLabel, aspectRatioValue, } from '../primitives/embed-providers'; export interface EmbedProps extends Omit, 'onError'> { /** The card id correlating every emitted event. */ cardId: string; /** The embed payload (data-down). */ data: EmbedCardData; /** Emit a contract CardEvent up (host routes it). */ onEmit?: (event: CardEvent) => void; } /** * `Embed` — a privacy-first lazy media facade. Initial render is a poster + a play * button: NO provider iframe, NO provider JS, NO cookies until the user opts in. * On play it swaps in the provider `