import { j as NamedAdapterFactory, A as AdapterKey } from './adapter-CvjXO9Gi.js';
export { a as AdapterCallbacks, c as AdapterConfig, h as AdapterError, d as AdapterFactory, g as AdapterOk, f as AdapterProps, b as AdapterResult, i as AdapterSubmit, e as Adapters, M as Method, N as NamedAdapterConfig } from './adapter-CvjXO9Gi.js';
import '@inertiajs/core';
import 'axios';

/**
 * Built-in 'local' adapter.
 *
 * Semantics:
 * - send(options?) resolves to `{ data: Body }`
 * - submit/run do nothing by default (no side effects)
 *
 * The core will typically call onSubmitted with the result of send().
 */
declare const localAdapter: NamedAdapterFactory<"local", any>;
/**
 * Register or override an adapter factory for a given key.
 *
 * Hosts can call this at bootstrap time, e.g.:
 *
 *   registerAdapter<'axios'>('axios', axiosAdapter);
 */
declare function registerAdapter<K extends AdapterKey, Body = any>(key: K, factory: NamedAdapterFactory<K, Body>): void;
/**
 * Lookup an adapter factory by key.
 *
 * If no adapter is found for the given key, this returns undefined.
 */
declare function getAdapter<K extends AdapterKey>(key: K): NamedAdapterFactory<K, any> | undefined;
/**
 * Check whether an adapter is registered for the given key.
 */
declare function hasAdapter(key: AdapterKey): boolean;

declare const createAxiosAdapter: NamedAdapterFactory<"axios">;

declare const createInertiaAdapter: NamedAdapterFactory<"inertia">;

/**
 * Register the Axios adapter under the "axios" key.
 *
 * This performs a basic runtime check to make sure Axios is present.
 * If Axios isn't available or doesn't look like a proper Axios instance,
 * an error is thrown.
 */
declare function registerAxiosAdapter(): void;
/**
 * Register the Inertia adapter under the "inertia" key.
 *
 * This explicitly tests that '@inertiajs/react' can be imported and that
 * it exposes a router with a .visit() method. If not, an error is thrown.
 *
 * Note:
 * - This function is async because it uses dynamic import.
 * - Call it at bootstrap time and await it:
 *
 *     await registerInertiaAdapter();
 */
declare function registerInertiaAdapter(): Promise<void>;
/**
 * Optional helper: convenience registration for known adapter keys.
 *
 * This is purely ergonomic; you can also call registerAxiosAdapter /
 * registerInertiaAdapter directly.
 */
declare function registerKnownAdapter(key: AdapterKey): Promise<void>;
/**
 * Convenience helper: register all known adapters.
 **/
declare function registerAllAdapters(): void;

export { AdapterKey, NamedAdapterFactory, createAxiosAdapter, createInertiaAdapter, getAdapter, hasAdapter, localAdapter, registerAdapter, registerAllAdapters, registerAxiosAdapter, registerInertiaAdapter, registerKnownAdapter };
