import { DcController } from "../DcController.js"; /** * Options for preview rendering. */ export interface PreviewRenderOptions { /** * A render function that renders the preview into the given div container. */ render: (container: HTMLDivElement) => void; } /** * A pre-styled preview which loads the viewer when the user clicks on the * preview. * * This method requires you to import the CSS sheet from * `@dreamcomposer/pre/lib/preview-style.css`. */ export interface PreviewPreStyledOptions { /** * The src of the placeholder image, shown blurred in the background of the * preview. It's recommended to create it with the `downloadScreenshot` * method in a low resolution (e.g. 480x270). */ placeholderImageSrc?: string; } /** * Options for setting a preview. */ export type PreviewOptions = PreviewRenderOptions | PreviewPreStyledOptions; /** * Sets a preview that is shown when the viewer is not loaded. * * @param dcController The DcController object obtained from the init function. */ export declare function setPreview(dcController: DcController, options: PreviewRenderOptions | PreviewPreStyledOptions): void;