/**
 * Copyright (c) OpenLens Maintainers. All rights reserved.
 * Licensed under MIT License. See LICENSE in root directory for more information.
 */
import type { Logger } from "@openlens/logger";
import type { JoinPaths } from "../../common/path/join-paths.injectable";
import type { GetDirnameOfPath } from "../../common/path/get-dirname.injectable";
import type { PathExists } from "../../common/fs/path-exists.injectable";
import type { RemovePath } from "../../common/fs/remove.injectable";
import type { WriteFile } from "../../common/fs/write-file.injectable";
import type { SelfSignedCert } from "selfsigned";
import type { Cluster } from "../../common/cluster/cluster";
import type { LoadKubeconfig } from "../../common/cluster/load-kubeconfig.injectable";
import type { KubeAuthProxyServer } from "../cluster/kube-auth-proxy-server.injectable";
interface KubeconfigManagerDependencies {
    readonly directoryForTemp: string;
    readonly logger: Logger;
    readonly certificate: SelfSignedCert;
    readonly kubeAuthProxyServer: KubeAuthProxyServer;
    readonly kubeAuthProxyUrl: string;
    joinPaths: JoinPaths;
    getDirnameOfPath: GetDirnameOfPath;
    pathExists: PathExists;
    removePath: RemovePath;
    writeFile: WriteFile;
    loadKubeconfig: LoadKubeconfig;
}
export declare class KubeconfigManager {
    private readonly dependencies;
    private readonly cluster;
    /**
     * The path to the temp config file
     *
     * - if `string` then path
     * - if `null` then not yet created or was cleared
     */
    protected tempFilePath: string | null;
    constructor(dependencies: KubeconfigManagerDependencies, cluster: Cluster);
    /**
     *
     * @returns The path to the temporary kubeconfig
     */
    ensurePath(): Promise<string>;
    /**
     * Deletes the temporary kubeconfig file
     */
    clear(): Promise<void>;
    protected ensureFile(): Promise<string>;
    /**
     * Creates new "temporary" kubeconfig that point to the kubectl-proxy.
     * This way any user of the config does not need to know anything about the auth etc. details.
     */
    protected createProxyKubeconfig(): Promise<string>;
}
export {};
