/**
 * Copyright (c) OpenLens Maintainers. All rights reserved.
 * Licensed under MIT License. See LICENSE in root directory for more information.
 */
import type { JoinPaths } from "../../common/path/join-paths.injectable";
import type { GetDirnameOfPath } from "../../common/path/get-dirname.injectable";
import type { GetBasenameOfPath } from "../../common/path/get-basename.injectable";
import type { NormalizedPlatform } from "../../common/vars/normalized-platform.injectable";
import type { Logger } from "@openlens/logger";
import type { ExecFile } from "../../common/fs/exec-file.injectable";
import type { Unlink } from "../../common/fs/unlink.injectable";
export interface KubectlDependencies {
    readonly directoryForKubectlBinaries: string;
    readonly normalizedDownloadPlatform: NormalizedPlatform;
    readonly normalizedDownloadArch: "amd64" | "arm64" | "386";
    readonly kubectlBinaryName: string;
    readonly bundledKubectlBinaryPath: string;
    readonly baseBundledBinariesDirectory: string;
    readonly state: {
        readonly kubectlBinariesPath?: string;
        readonly downloadBinariesPath?: string;
        readonly downloadKubectlBinaries: boolean;
        readonly downloadMirror: string;
    };
    readonly bundledKubectlVersion: string;
    readonly kubectlVersionMap: Map<string, string>;
    readonly logger: Logger;
    joinPaths: JoinPaths;
    getDirnameOfPath: GetDirnameOfPath;
    getBasenameOfPath: GetBasenameOfPath;
    execFile: ExecFile;
    unlink: Unlink;
}
export declare class Kubectl {
    protected readonly dependencies: KubectlDependencies;
    readonly kubectlVersion: string;
    protected readonly url: string;
    protected readonly path: string;
    protected readonly dirname: string;
    static invalidBundle: boolean;
    constructor(dependencies: KubectlDependencies, clusterVersion: string);
    getBundledPath(): string;
    getPathFromPreferences(): string;
    protected getDownloadDir(): string;
    getPath: (bundled?: boolean) => Promise<string>;
    binDir(): Promise<string>;
    checkBinary(path: string, checkVersion?: boolean): Promise<boolean | undefined>;
    protected checkBundled(): Promise<boolean>;
    ensureKubectl(): Promise<boolean>;
    downloadKubectl(): Promise<void>;
    protected writeInitScripts(): Promise<void>;
    protected getDownloadMirror(): string;
}
