import type { ReactNode } from "react";
import { useStoryboard } from "../../hooks/useStoryboard";
import { StoryboardLoaded } from "./StoryboardLoaded";
export interface StoryboardViewProps {
projectId: string;
/** Select a composition in the timeline (used by the frame focus "Open in Preview"). */
onSelectComposition: (path: string) => void;
}
/**
* Top-level storyboard stage. Replaces the timeline/preview when the view mode
* is `storyboard`. Handles the load states here; once a storyboard exists,
* {@link StoryboardLoaded} owns the Board ↔ Source experience.
*/
// fallow-ignore-next-line complexity
export function StoryboardView({ projectId, onSelectComposition }: StoryboardViewProps) {
const { data, loading, error, reload } = useStoryboard(projectId);
if (loading) return
Add a {path} at
the project root to plan this video frame by frame. Your agent can create and iterate on it
for you.