import { MapComponentProps } from './types';
/**
 * Captures screenshots of a map instance, supporting both CARTO and Google Maps basemaps.
 *
 * @param mapId - Identifier of the map to capture.
 * @param pixelRatio - Target device-pixel ratio for the capture (both the maplibre basemap and the deck.gl overlay). Defaults to `Math.max(2, window.devicePixelRatio)` — at least 2× so the map is sharp on Linux/Windows displays where `window.devicePixelRatio` is typically 1, but never below the display's native DPR (e.g. 3 on a high-DPI laptop). When the resolved value already matches `window.devicePixelRatio`, no resize happens. Google Maps basemaps are captured via `html2canvas` at the requested scale and are unaffected by the maplibre resize path.
 * @returns An object with `takeScreenshot` to trigger capture, `screenshot` as a data URL string, `isLoading`, `error`, and `reset`.
 *
 * @remarks
 * Google Maps basemaps must use raster rendering mode; vector mode is not supported.
 * If map instances are not ready when `takeScreenshot` is called, the capture is automatically retried until they become available.
 * When resizing for capture, maplibre is bumped first (`setPixelRatio` + `triggerRepaint` + `await once('idle')`) so basemap tiles re-render at the new DPR; then deck is bumped via `setProps({ useDevicePixels })` followed by a forced redraw (luma's `_resizeDrawingBufferIfNeeded` only runs from `getCurrentFramebuffer` — i.e. inside a render pass — so `setProps` alone marks the resize but doesn't apply it). After capture, both are restored fire-and-forget so the screenshot promise resolves as soon as the data URL is ready.
 * The capture additionally waits for the basemap's `idle` event and for `deck.needsRedraw()` to return `false` for two consecutive frames before drawing. This avoids partially-painted frames immediately after viewstate changes (e.g. zoom) where tile streaming or layer interpolation can leave the canvas in a transient cut state.
 *
 * @example
 * ```tsx
 * // Default — at least 2× on every OS, native DPR on higher-density displays.
 * const { takeScreenshot, screenshot } = useMapScreenshot({ mapId: 'main-map' })
 *
 * // Force a specific ratio.
 * const { takeScreenshot, screenshot } = useMapScreenshot({ mapId: 'main-map', pixelRatio: 3 })
 * ```
 */
export declare function useMapScreenshot({ mapId, pixelRatio, }: {
    mapId: MapComponentProps['id'];
    pixelRatio?: number;
}): {
    takeScreenshot: () => void;
    screenshot: string | undefined;
    isLoading: boolean;
    error: Error | undefined;
    reset: () => void;
};
