import type { SwapStrategy } from '../commands/dom/swap';
export interface BoostedConfig {
    container: HTMLElement;
    target?: string | HTMLElement;
    linkSelector?: string;
    formSelector?: string;
    boostForms?: boolean;
    strategy?: SwapStrategy;
    pushUrl?: boolean;
    useViewTransition?: boolean;
    fetchOptions?: RequestInit;
    onBeforeFetch?: (url: string, method: string) => void | boolean | Promise<void | boolean>;
    onAfterSwap?: (url: string, content: string) => void | Promise<void>;
    onError?: (error: Error, url: string) => void;
}
export interface BoostedInstance {
    destroy: () => void;
    config: BoostedConfig;
    boost: (url: string, method?: string, body?: FormData | null) => Promise<void>;
}
export declare function createBoosted(config: BoostedConfig): BoostedInstance;
export declare const BoostedBehavior: {
    name: string;
    init(element: HTMLElement, params?: Record<string, unknown>): BoostedInstance;
    destroy(instance: BoostedInstance): void;
};
export declare function registerBoosted(registry: Map<string, unknown> | any): void;
export declare const boostedHyperscript = "\nbehavior Boosted(target, pushHistory)\n  init\n    if no target then set target to document.body end\n    if no pushHistory then set pushHistory to true end\n  end\n\n  on click from <a[href]/> in me\n    -- Skip if modifier keys pressed\n    if event.metaKey or event.ctrlKey or event.shiftKey or event.altKey then exit end\n\n    -- Skip external links\n    set href to the @href of the target\n    if href starts with 'http' and not (href starts with location.origin) then exit end\n\n    -- Skip links with target attribute\n    if the target has @target then exit end\n\n    halt the event\n    add .hx-swapping to target\n    fetch href as html\n    swap target with it\n    remove .hx-swapping from target\n    if pushHistory then push url href end\n  end\nend\n";
//# sourceMappingURL=boosted.d.ts.map