import FetchError from "./classes";
export type UseGetOptions<Response> = {
    onResponse?: (data: Response) => void;
    onErrorResponse?: (error: FetchError) => void;
    onRequestDone?: (url: string, endpoint: string, responseCode: number | string | undefined) => void;
    debounce?: number;
    preventIncludeNullOrUndefined?: boolean;
    headers?: Record<string, string>;
    baseApiUrl?: string;
};
/**
 * A custom React hook for making GET requests using the Fetch API.
 * @template Response The type of the response data.
 * @param url The API endpoint URL (relative or absolute). The request will resend when the url change. use debounce in options to make a delay
 * @param options Optional configuration for the GET request.
 * @param options.onDataGet Callback invoked with the response data on success.
 * @param options.onErrorResponse Callback invoked with a FetchError on failure.
 * @param options.debounce Delay in milliseconds before sending the request..
 * @param options.preventIncludeNullOrUndefined If true, skips requests if the URL contains "undefined" or "null".
 * @param options.headers Custom headers for the request.
 * @param options.baseApiUrl Base URL to prepend to the endpoint.
 * @returns An object containing the response data, error, loading state, and a reload function.
 * @example
 * const { data, error, loading, reload } = useGet<User>("/api/user", {
 *   baseApiUrl: "http://localhost:5000",
 *   onDataGet: (data) => console.log(data),
 * });
 */
export declare function useGet<T>(baseApiUrl: string, url: string, options?: UseGetOptions<T>): {
    data: T | undefined;
    error: FetchError | undefined;
    loading: boolean;
    reload: () => void;
};
