interface Preview { enabled: boolean; state: Record; _initialized?: boolean; } /** * Options for configuring preview mode. */ interface PreviewModeOptions { /** * A function that determines whether preview mode should be enabled based on the current state. * @param {Record} state - The state of the preview. * @returns {boolean} A boolean indicating whether the preview mode is enabled. */ shouldEnable?: (state: Preview['state']) => boolean; /** * A function that retrieves the current state. * The `getState` function will append returned values to current state, so be careful not to accidentally overwrite important state. * @param {Record} state - The preview state. * @returns {Record} The preview state. */ getState?: (state: Preview['state']) => S; /** * A function to be called when the preview mode is enabled. */ onEnable?: () => void; /** * A function to be called when the preview mode is disabled. */ onDisable?: () => void; } type EnteredState = Record | null | undefined | void; /** @since 3.11.0 */ export declare function usePreviewMode(options?: PreviewModeOptions): { enabled: import("vue").Ref; state: S extends void ? Preview["state"] : (NonNullable & Preview["state"]); }; export {};