import type { RequestData } from '@mometa/fs-handler';
import { AxiosInstance } from 'axios';
import { ReactNode } from 'react';
export interface Toast {
    error: (message: ReactNode) => void | (() => void);
    loading: (message: ReactNode) => void | (() => void);
}
export declare abstract class ApiCore {
    protected apiBaseURL: string;
    protected toast: Toast;
    protected axios: AxiosInstance;
    constructor(apiBaseURL: string, toast: Toast);
    openEditor(body: {
        fileName: string;
        lineNumber?: number;
        colNumber?: number;
    }): Promise<any>;
    doAsync(prom: any, { beforeMessage }?: {
        beforeMessage?: string;
    }): Promise<any>;
    submitOperation(requestData: RequestData & {
        preload: RequestData['preload'] & {
            relativeFilename: string;
        };
    }, label?: string): Promise<boolean>;
    protected abstract _submitOperation(requestData: RequestData): Promise<boolean>;
}
