/**
 * Remotion rendering and compositing utilities.
 *
 * Uses `npx remotion` on-demand — Remotion is NOT a package dependency.
 * Scaffolds a temporary project, renders H264 MP4, and muxes audio separately.
 *
 * Strategy:
 * - Images/Videos are embedded NATIVELY inside the Remotion component using
 *   <Img> / <Video> from Remotion (copied to public/).
 * - No transparent WebM rendering. No FFmpeg overlay compositing.
 * - Final output is always a standard H264 MP4.
 */
export interface RenderMotionOptions {
    /** Generated TSX component code */
    componentCode: string;
    /** Export name of the component */
    componentName: string;
    width: number;
    height: number;
    fps: number;
    durationInFrames: number;
    /** Output path for rendered video (.webm or .mp4) */
    outputPath: string;
    /** Render with transparent background (default: true) */
    transparent?: boolean;
}
export interface RenderResult {
    success: boolean;
    outputPath?: string;
    error?: string;
}
/**
 * Check that `npx remotion` is available. Returns an error message if not.
 */
export declare function ensureRemotionInstalled(): Promise<string | null>;
/**
 * Create a minimal Remotion project in a temp directory.
 * Returns the directory path.
 *
 * @param useMediaPackage - Include @remotion/media for <Video> support (default: false)
 */
export declare function scaffoldRemotionProject(componentCode: string, componentName: string, opts: {
    width: number;
    height: number;
    fps: number;
    durationInFrames: number;
    useMediaPackage?: boolean;
}): Promise<string>;
/**
 * Render a standalone Remotion composition to video (no base media).
 * When transparent: tries VP8 then VP9.
 * When opaque: renders H264 MP4.
 */
export declare function renderMotion(options: RenderMotionOptions): Promise<RenderResult>;
/**
 * Validates and auto-fixes common LLM-generated Remotion code bugs before
 * attempting to render. Returns fixed code and a list of applied fixes.
 *
 * Known patterns fixed:
 *  1. interpolate(x, [a,b], scalar, num) → interpolate(x, [a,b], [scalar, num])
 *     Cause: outputRange must be an array, not a bare scalar.
 *  2. interpolate(x, [a,b], scalar) where scalar is a variable name
 *     Cause: same — LLM passes a single number variable instead of [from, to].
 */
export declare function validateAndFixMotionCode(code: string): {
    code: string;
    fixes: string[];
};
/**
 * Wrap an overlay component to embed a static image as background.
 * Uses Remotion's <Img> component (required per Remotion docs — ensures
 * image is fully loaded before each frame renders).
 *
 * Injects Img and staticFile into the component's existing remotion import
 * to avoid duplicate identifier errors.
 */
export declare function wrapComponentWithImage(componentCode: string, componentName: string, imageFileName: string): {
    code: string;
    name: string;
};
/**
 * Render a Remotion component that embeds a static image as background.
 * Copies image to public/, renders H264 MP4 directly — no transparency needed.
 */
export declare function renderWithEmbeddedImage(options: {
    componentCode: string;
    componentName: string;
    width: number;
    height: number;
    fps: number;
    durationInFrames: number;
    imagePath: string;
    imageFileName: string;
    outputPath: string;
}): Promise<RenderResult>;
/**
 * Wrap an overlay component to embed a video as background.
 * Uses <Video> from @remotion/media (required per Remotion docs).
 * Video is muted — audio is muxed back via FFmpeg after rendering.
 *
 * Injects staticFile into the component's existing remotion import to avoid
 * duplicate identifier errors. Video is imported from @remotion/media
 * (different module — no conflict).
 */
export declare function wrapComponentWithVideo(componentCode: string, componentName: string, videoFileName: string): {
    code: string;
    name: string;
};
/**
 * Render a Remotion component that embeds the video directly.
 * Uses @remotion/media's <Video> component (official Remotion approach).
 * After rendering, muxes audio from the original video back into the output.
 */
export declare function renderWithEmbeddedVideo(options: {
    componentCode: string;
    componentName: string;
    width: number;
    height: number;
    fps: number;
    durationInFrames: number;
    videoPath: string;
    videoFileName: string;
    outputPath: string;
}): Promise<RenderResult>;
export interface CaptionSegment {
    start: number;
    end: number;
    text: string;
}
export type CaptionStylePreset = "bold" | "minimal" | "outline" | "karaoke";
export interface GenerateCaptionComponentOptions {
    segments: CaptionSegment[];
    style: CaptionStylePreset;
    fontSize: number;
    fontColor: string;
    position: "top" | "center" | "bottom";
    width: number;
    height: number;
    /** When set, embed the video inside the component (no transparency needed) */
    videoFileName?: string;
}
export type TextOverlayStyle = "lower-third" | "center-bold" | "subtitle" | "minimal";
export interface GenerateTextOverlayComponentOptions {
    texts: string[];
    style: TextOverlayStyle;
    fontSize: number;
    fontColor: string;
    startTime: number;
    endTime: number;
    fadeDuration: number;
    width: number;
    height: number;
    videoFileName: string;
}
/**
 * Generate a Remotion TSX component for text overlays.
 * Fallback for when FFmpeg drawtext filter (libfreetype) is unavailable.
 */
export declare function generateTextOverlayComponent(options: GenerateTextOverlayComponentOptions): {
    code: string;
    name: string;
};
/**
 * Generate a Remotion TSX component that renders styled captions.
 * No LLM call — purely programmatic from SRT segments + style config.
 */
export declare function generateCaptionComponent(options: GenerateCaptionComponentOptions): {
    code: string;
    name: string;
};
export interface AnimatedCaptionWord {
    word: string;
    start: number;
    end: number;
}
export interface AnimatedCaptionGroup {
    words: AnimatedCaptionWord[];
    startTime: number;
    endTime: number;
    text: string;
}
export type AnimatedCaptionStylePreset = "highlight" | "bounce" | "pop-in" | "neon";
export interface GenerateAnimatedCaptionComponentOptions {
    groups: AnimatedCaptionGroup[];
    style: AnimatedCaptionStylePreset;
    highlightColor: string;
    fontSize: number;
    position: "top" | "center" | "bottom";
    width: number;
    height: number;
    fps: number;
    videoFileName?: string;
}
/**
 * Generate a Remotion TSX component for word-level animated captions.
 * Each style creates different visual effects per word.
 */
export declare function generateAnimatedCaptionComponent(options: GenerateAnimatedCaptionComponentOptions): {
    code: string;
    name: string;
};
