'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Play } from 'lucide-react';
export function VideoPreview({ data, variant = 'inline' }) {
    const poster = data.poster;
    const autoplay = data.autoplay;
    const loop = data.loop;
    const badges = [autoplay ? 'Autoplay' : '', loop ? 'Loop' : ''].filter((b) => b !== '');
    const content = (_jsxs("div", { className: "bg-muted relative flex aspect-video items-center justify-center overflow-hidden rounded-md", children: [poster ? (_jsx("img", { src: poster, alt: "", className: "absolute inset-0 h-full w-full object-cover" })) : (_jsx("div", { className: "bg-card absolute inset-0" })), _jsx("div", { className: "bg-primary/90 relative z-10 flex h-12 w-12 items-center justify-center rounded-full shadow-sm", children: _jsx(Play, { size: 20, className: "text-primary-foreground" }) }), badges.length > 0 && (_jsx("div", { className: "absolute right-2 bottom-2 z-10 flex gap-1", children: badges.map((badge) => (_jsx("span", { className: "bg-background/80 text-muted-foreground rounded px-1.5 py-0.5 text-xs", children: badge }, badge))) }))] }));
    if (variant === 'background') {
        return (_jsx("div", { className: "border-border overflow-hidden rounded-md border", children: _jsxs("div", { className: "relative aspect-[21/9]", children: [poster ? (_jsx("img", { src: poster, alt: "", className: "absolute inset-0 h-full w-full object-cover" })) : (_jsx("div", { className: "bg-card absolute inset-0" })), _jsx("div", { className: "bg-background/30 absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "bg-primary/90 flex h-14 w-14 items-center justify-center rounded-full shadow-sm", children: _jsx(Play, { size: 24, className: "text-primary-foreground" }) }) })] }) }));
    }
    if (variant === 'lightbox') {
        return (_jsx("div", { className: "border-border rounded-md border p-4", children: _jsxs("div", { className: "mx-auto max-w-sm", children: [content, _jsx("p", { className: "text-muted-foreground mt-2 text-center text-xs", children: "Click to play in lightbox" })] }) }));
    }
    return _jsx("div", { className: "border-border rounded-md border p-4", children: content });
}
//# sourceMappingURL=VideoPreview.js.map