import { RenderProgress, RenderToVideoOptions } from "../preview/renderTimegroupToVideo.types.js";
import { RenderInfo } from "../getRenderInfo.js";

//#region src/render/EFRenderAPI.d.ts

interface IEFRenderAPI {
  /**
   * Render with streaming output (calls window.onRenderChunk for each chunk).
   * Use this for CLI/Playwright to avoid memory buffering.
   */
  renderStreaming(options?: RenderToVideoOptions): Promise<void>;
  /**
   * Render and return buffer (for shorter videos or in-browser use).
   * Returns the video as Uint8Array.
   */
  render(options?: RenderToVideoOptions): Promise<Uint8Array>;
  /**
   * Get render info (dimensions, duration, assets).
   * Same as the exported getRenderInfo function.
   */
  getRenderInfo(): Promise<RenderInfo>;
  /**
   * Check if SDK is ready for rendering.
   * Returns true if a root timegroup is found.
   */
  isReady(): boolean;
}
declare global {
  interface Window {
    EF_RENDER?: IEFRenderAPI;
    EF_RENDER_DATA?: Record<string, unknown>;
    onRenderChunk?: (chunk: Uint8Array) => void;
    onRenderProgress?: (progress: RenderProgress) => void;
  }
}
//# sourceMappingURL=EFRenderAPI.d.ts.map