import { AjaxConfig, AjaxContentType, HttpMethod } from '../../../../../../types/src/table';
import { default as Module } from '../../core/Module';
import { default as Tabulator } from '../../core/Tabulator';

type LoaderPromise = (this: Ajax, url: string, config: any, params: Record<string, unknown>) => Promise<any>;
type URLGenerator = (url: string, config: any, params: Record<string, unknown>) => string;
export default class Ajax extends Module {
    static moduleName: string;
    static defaultConfig: AjaxConfig;
    static defaultURLGenerator: URLGenerator;
    static contentTypeFormatters: Record<string, AjaxContentType>;
    config: AjaxConfig;
    url: string;
    urlGenerator: URLGenerator | false;
    params: Record<string, unknown> | false;
    loaderPromise: LoaderPromise | false;
    contentTypeFormatters: Record<string, AjaxContentType>;
    private readonly fetchApi;
    static defaultLoaderPromise: LoaderPromise;
    constructor(table: Tabulator);
    initialize(): void;
    requestParams(data: any, config: any, silent: boolean, params: Record<string, unknown>): Record<string, unknown>;
    requestDataCheck(data: any): boolean;
    requestData(url: string | any, params: Record<string, unknown>, config: any, silent: boolean, previousData: any): Promise<any> | any;
    setDefaultConfig(config?: HttpMethod | AjaxConfig | undefined): void;
    generateConfig(config?: HttpMethod | AjaxConfig | undefined): RequestInit;
    setUrl(url: string): void;
    getUrl(): string;
    /**
     * Send an AJAX request to the specified URL with the given parameters and configuration.
     * @param url - The URL to send the request to.
     * @param params - The parameters to send with the request.
     * @param config - The configuration to send with the request.
     * @returns A promise that resolves to the data from the request.
     */
    sendRequest(url: string, params: Record<string, unknown>, config: RequestInit): Promise<any>;
}
export {};
