import { type Readable } from 'svelte/store'; import type { Chapter, StoryState } from '../core/types/story'; export type StoryPreviewStartOptions = { /** Chapter to start from. Defaults to the first chapter in the story. */ chapterId?: string; /** Play only the starting chapter instead of continuing through the story. */ singleChapter?: boolean; }; export type StoryPreviewOrchestrator = { isPreviewing: Readable; start: (options?: StoryPreviewStartOptions) => Promise; stop: () => void; }; export declare const getPreviewChapterDuration: (chapter: Chapter, narration: { start: number; end: number; } | null) => number; export declare const createStoryPreviewOrchestrator: ({ getStory, getSelectedChapterId, selectChapter, applyChapter, getNarrationSegment, closeEditors, stopPlayback, wait, }: { getStory: () => StoryState; getSelectedChapterId: () => string | null; selectChapter: (chapterId: string) => void; applyChapter: (chapter: Chapter) => void; getNarrationSegment: (chapter: Chapter) => { start: number; end: number; } | null; closeEditors: () => void; stopPlayback: () => void; wait?: (durationMs: number) => Promise; }) => StoryPreviewOrchestrator;