import { type JobProgressEstimate } from "@pixerate/editor/generation"; export interface JobProgressOptions { startedAt: number | Date | string; expectedMs?: number; done?: boolean; /** Fixed current time (disables ticking; useful for SSR and tests). */ now?: number | Date | string; /** Update interval while running in ms (default 1000). */ intervalMs?: number; } export interface SvelteJobProgress { readonly progress: JobProgressEstimate; readonly percent: number; readonly label: string; /** Stops ticking. */ destroy(): void; } /** * Ticking `estimateJobProgress` (Svelte 5 runes). Pass a getter so it follows * `$state` options; it ticks every `intervalMs` while not `done` and no fixed * `now` is given (browser only; nothing ticks during SSR). Call `destroy()` * when done (e.g. in `onDestroy`). */ export declare function createJobProgress(options: () => JobProgressOptions): SvelteJobProgress;