import { RenderMode } from "./previewSettings.js";
import { RenderContext } from "./RenderContext.js";

//#region src/preview/renderElementToCanvas.d.ts

/**
 * Options for rendering an element to canvas.
 */
interface RenderElementOptions {
  /** Time to render at in milliseconds (used for serialization metadata) */
  timeMs: number;
  /** Scale factor for canvas encoding (default: 1.0) */
  scale?: number;
  /** Output width in pixels (defaults to element's computed width or 1920) */
  width?: number;
  /** Output height in pixels (defaults to element's computed height or 1080) */
  height?: number;
  /** Render context for canvas pixel caching */
  renderContext?: RenderContext;
  /** Override render mode (native or foreignObject) */
  renderMode?: RenderMode;
}
/**
 * Render any element to canvas or image.
 *
 * This is a low-level rendering function that renders the element as-is.
 * The caller is responsible for:
 * - Creating clones if needed
 * - Seeking to the correct time
 * - Finding the correct element to render
 *
 * Use cases:
 * - Preview: Pass prime timeline element (already at correct time)
 * - Video/thumbnails: Pass element from reused clone (already seeked)
 * - One-off capture: Create clone, seek, pass element, clean up
 *
 * @param element - Element to render (timegroup, temporal element, or plain DOM)
 * @param options - Render options
 * @returns Canvas or Image (both are CanvasImageSource)
 */
declare function renderElementToCanvas(element: Element, options: RenderElementOptions): Promise<CanvasImageSource>;
//#endregion
export { RenderElementOptions, renderElementToCanvas };
//# sourceMappingURL=renderElementToCanvas.d.ts.map