import type { SwapStrategy } from '../commands/dom/swap';
export interface HistorySwapConfig {
    target: string | HTMLElement;
    strategy?: SwapStrategy;
    useViewTransition?: boolean;
    fetchOptions?: RequestInit;
    transformUrl?: (url: string) => string;
    onBeforeFetch?: (url: string) => void | Promise<void>;
    onAfterSwap?: (url: string, content: string) => void | Promise<void>;
    onError?: (error: Error, url: string) => void;
}
export interface HistorySwapInstance {
    destroy: () => void;
    config: HistorySwapConfig;
}
export declare function createHistorySwap(config: HistorySwapConfig): HistorySwapInstance;
export declare const HistorySwapBehavior: {
    name: string;
    init(element: HTMLElement, params?: Record<string, unknown>): HistorySwapInstance;
    destroy(instance: HistorySwapInstance): void;
};
export declare function registerHistorySwap(registry: Map<string, unknown> | any): void;
export declare const historySwapHyperscript = "\nbehavior HistorySwap(target, strategy)\n  init\n    if no target then set target to me end\n    if no strategy then set strategy to 'morph' end\n  end\n\n  on popstate from window\n    add .hx-swapping to target\n    fetch location.href as html\n    if strategy is 'morph' then\n      swap target with it\n    else if strategy is 'innerHTML' then\n      swap innerHTML of target with it\n    else\n      swap target with it\n    end\n    remove .hx-swapping from target\n  end\nend\n";
//# sourceMappingURL=history-swap.d.ts.map