import { Eye, ImageIcon, VideoIcon } from "lucide-react"; import { WYSIWYG_STYLES } from "@/components/generic/Blocks/TextBlock"; export function LessonHeader({ lesson }) { if (!lesson) return null; return (

{lesson.title}

{lesson.description && (

{lesson.description}

)}
{lesson.objectives?.length > 0 && (

Objective

)}
); } export function PreviewImage({ url, alt }) { if (!url) { return (
No image
); } return ( {alt ); } export function PreviewVideo({ url, thumb }) { if (!url) { return (
No video
); } return (
{thumb ? ( Video thumbnail ) : (
)}

{url}

); } export function PreviewBlock({ block }) { const { type, content } = block; if (type === "text") { if (!content.body) { return
Empty text block
; } return (
); } if (type === "image") { if (!content.url) { return (
No image selected
); } return (
{content.alt
); } if (type === "text-image") { const imgLeft = content.image_position === "left"; return (
{imgLeft && }
Empty text

" }} /> {!imgLeft && }
); } if (type === "video") { if (!content.url) { return (
No video selected
); } return ; } if (type === "text-video") { const vidLeft = content.video_position === "left"; return (
{vidLeft && }
Empty text

" }} /> {!vidLeft && }
); } return null; } export function PreviewContent({ lesson, blocks, empty = "No content yet." }) { return ( <> {blocks.length === 0 ? (

{empty}

) : ( blocks.map((block) => (
)) )} ); } export function PreviewChrome({ title, children }) { return (
{title ?? "Lesson Preview"}
{children}
); }