/**
 * Typed API client
 * @countermeasure/web-components/services/api
 */
export interface ApiClientConfig {
    baseUrl?: string;
    headers?: Record<string, string>;
    getAuthToken?: () => string | null;
    onUnauthorized?: () => void;
    /** Optional CSRF token getter — token is auto-injected on POST/PUT/DELETE/PATCH */
    getCsrfToken?: () => string | null;
    /** Header name for the CSRF token (default: 'X-CSRF-Token') */
    csrfHeaderName?: string;
}
export interface ApiError {
    status: number;
    message: string;
    body?: unknown;
}
export declare class ApiClient {
    private readonly config;
    constructor(config: ApiClientConfig);
    get<T>(path: string, options?: RequestInit): Promise<T>;
    post<T>(path: string, body?: unknown, options?: RequestInit): Promise<T>;
    put<T>(path: string, body?: unknown, options?: RequestInit): Promise<T>;
    delete<T>(path: string, options?: RequestInit): Promise<T>;
    request<T>(path: string, options?: RequestInit): Promise<T>;
}
export declare function createApiClient(config?: ApiClientConfig): ApiClient;
//# sourceMappingURL=api.d.ts.map