/**
 * Copyright (c) OpenLens Maintainers. All rights reserved.
 * Licensed under MIT License. See LICENSE in root directory for more information.
 */
import type { IComputedValue } from "mobx";
import type { Pod } from "@openlens/kube-object";
import type { IntervalFn } from "@openlens/utilities";
import type { TabId } from "../dock/store";
import type { CallForLogs } from "./call-for-logs.injectable";
import type { LogTabData } from "./tab-store";
interface Dependencies {
    callForLogs: CallForLogs;
}
export declare class LogStore {
    private dependencies;
    protected podLogs: import("mobx").ObservableMap<string, string[]>;
    protected refreshers: Map<string, IntervalFn>;
    constructor(dependencies: Dependencies);
    protected handlerError(tabId: TabId, error: any): void;
    /**
     * Function prepares tailLines param for passing to API request
     * Each time it increasing it's number, caused to fetch more logs.
     * Also, it handles loading errors, rewriting whole logs with error
     * messages
     */
    load(tabId: TabId, computedPod: IComputedValue<Pod | undefined>, logTabData: IComputedValue<LogTabData | undefined>): Promise<void>;
    private getRefresher;
    /**
     * Stop loading more logs for a given tab
     * @param tabId The ID of the logs tab to stop loading more logs for
     */
    stopLoadingLogs(tabId: TabId): void;
    /**
     * Function is used to refresher/stream-like requests.
     * It changes 'sinceTime' param each time allowing to fetch logs
     * starting from last line received.
     * @param tabId
     */
    loadMore(tabId: TabId, computedPod: IComputedValue<Pod | undefined>, logTabData: IComputedValue<LogTabData | undefined>): Promise<void>;
    /**
     * Main logs loading function adds necessary data to payload and makes
     * an API request
     * @param tabId
     * @param params request parameters described in IPodLogsQuery interface
     * @returns A fetch request promise
     */
    private loadLogs;
    /**
     * @deprecated This depends on dockStore, which should be removed
     * Converts logs into a string array
     * @returns Length of log lines
     */
    get lines(): number;
    getLogLines(tabId: TabId): number;
    areLogsPresent(tabId: TabId): boolean;
    getLogs(tabId: TabId): string[];
    getLogsWithoutTimestamps(tabId: TabId): string[];
    getTimestampSplitLogs(tabId: TabId): [string, string][];
    /**
     * @deprecated This now only returns the empty array
     * Returns logs with timestamps for selected tab
     */
    get logs(): string[];
    /**
     * @deprecated This now only returns the empty array
     * Removes timestamps from each log line and returns changed logs
     * @returns Logs without timestamps
     */
    get logsWithoutTimestamps(): string[];
    /**
     * It gets timestamps from all logs then returns last one + 1 second
     * (this allows to avoid getting the last stamp in the selection)
     * @param tabId
     */
    getLastSinceTime(tabId: TabId): string;
    splitOutTimestamp(logs: string): [string, string];
    getTimestamps(logs: string): RegExpMatchArray | null;
    removeTimestamps(logs: string): string;
    clearLogs(tabId: TabId): void;
    reload(tabId: TabId, computedPod: IComputedValue<Pod | undefined>, logTabData: IComputedValue<LogTabData | undefined>): Promise<void>;
}
export {};
