import type { PreviewWeb } from '@storybook/preview-web';
import type { AnyFramework } from '@storybook/csf';
import type { StoryStore } from '@storybook/client-api';
import { makeDecorator } from '@storybook/preview-api';
import { Channel } from '@storybook/channels';
import { CaptureOptions, StoriesRaw, StorybookGlobals } from '../../types.js';
declare global {
    interface Window {
        __CREEVEY_SERVER_HOST__: string;
        __CREEVEY_SERVER_PORT__: number;
        __CREEVEY_WORKER_ID__: number;
        __CREEVEY_GET_STORIES__: () => Promise<StoriesRaw | undefined>;
        __CREEVEY_SELECT_STORY__: (storyId: string, shouldWaitForReady: boolean, callback: (response: [error?: string | null, isCaptureCalled?: boolean]) => void) => Promise<void>;
        __CREEVEY_UPDATE_GLOBALS__: (globals: StorybookGlobals) => void;
        __CREEVEY_INSERT_IGNORE_STYLES__: (ignoreElements: string[]) => HTMLStyleElement;
        __CREEVEY_REMOVE_IGNORE_STYLES__: (ignoreStyles: HTMLStyleElement) => void;
        __CREEVEY_HAS_PLAY_COMPLETED_YET__: (callback: (isPlayCompleted: boolean) => void) => void;
        __CREEVEY_SET_READY_FOR_CAPTURE__?: () => void;
        __STORYBOOK_ADDONS_CHANNEL__: Channel;
        __STORYBOOK_STORY_STORE__: StoryStore<AnyFramework>;
        __STORYBOOK_PREVIEW__: PreviewWeb<AnyFramework>;
    }
}
export declare function withCreevey(): ReturnType<typeof makeDecorator>;
export declare function capture(options?: CaptureOptions): Promise<void>;
