/**
 * Copyright (c) OpenLens Maintainers. All rights reserved.
 * Licensed under MIT License. See LICENSE in root directory for more information.
 */
import { type KubeConfig } from "@kubernetes/client-node";
import { ClusterStatus } from "../../common/cluster-types";
import type { CreateListNamespaces } from "../../common/cluster/list-namespaces.injectable";
import type { BroadcastMessage } from "../../common/ipc/broadcast-message.injectable";
import type { Logger } from "@openlens/logger";
import type { KubeApiResource } from "../../common/rbac";
import type { ClusterPrometheusHandler } from "./prometheus-handler/prometheus-handler";
import type { BroadcastConnectionUpdate } from "./broadcast-connection-update.injectable";
import type { KubeAuthProxyServer } from "./kube-auth-proxy-server.injectable";
import type { LoadProxyKubeconfig } from "./load-proxy-kubeconfig.injectable";
import type { RemoveProxyKubeconfig } from "./remove-proxy-kubeconfig.injectable";
import type { RequestApiResources } from "./request-api-resources.injectable";
import type { DetectClusterMetadata } from "../cluster-detectors/detect-cluster-metadata.injectable";
import type { FallibleOnlyClusterMetadataDetector } from "../cluster-detectors/token";
import type { CreateAuthorizationApi } from "../../common/cluster/create-authorization-api.injectable";
import type { CreateCanI } from "../../common/cluster/create-can-i.injectable";
import type { CreateRequestNamespaceListPermissions, RequestNamespaceListPermissions } from "../../common/cluster/create-request-namespace-list-permissions.injectable";
import type { Cluster } from "../../common/cluster/cluster";
import type { CreateCoreApi } from "../../common/cluster/create-core-api.injectable";
interface Dependencies {
    readonly logger: Logger;
    readonly prometheusHandler: ClusterPrometheusHandler;
    readonly kubeAuthProxyServer: KubeAuthProxyServer;
    readonly clusterVersionDetector: FallibleOnlyClusterMetadataDetector;
    createCanI: CreateCanI;
    requestApiResources: RequestApiResources;
    createRequestNamespaceListPermissions: CreateRequestNamespaceListPermissions;
    createAuthorizationApi: CreateAuthorizationApi;
    createCoreApi: CreateCoreApi;
    createListNamespaces: CreateListNamespaces;
    detectClusterMetadata: DetectClusterMetadata;
    broadcastMessage: BroadcastMessage;
    broadcastConnectionUpdate: BroadcastConnectionUpdate;
    loadProxyKubeconfig: LoadProxyKubeconfig;
    removeProxyKubeconfig: RemoveProxyKubeconfig;
}
export type { ClusterConnection };
declare class ClusterConnection {
    private readonly dependencies;
    private readonly cluster;
    protected readonly eventsDisposer: import("@openlens/utilities").ExtendableDisposer;
    protected activated: boolean;
    constructor(dependencies: Dependencies, cluster: Cluster);
    private bindEvents;
    protected recreateProxyKubeconfig(): Promise<void>;
    /**
     * @param force force activation
     */
    activate(force?: boolean): Promise<void>;
    reconnect(): Promise<void>;
    disconnect(): void;
    refresh(): Promise<void>;
    refreshAccessibilityAndMetadata(): Promise<void>;
    refreshMetadata(): Promise<void>;
    private refreshAccessibility;
    refreshConnectionStatus(): Promise<void>;
    protected getConnectionStatus(): Promise<ClusterStatus>;
    protected requestAllowedNamespaces(proxyConfig: KubeConfig): Promise<string[]>;
    protected getResourcesToShow(allowedNamespaces: string[], knownResources: KubeApiResource[], req: RequestNamespaceListPermissions): Promise<string[]>;
}
declare const clusterConnectionInjectable: import("@ogre-tools/injectable").Injectable<ClusterConnection, unknown, Cluster>;
export default clusterConnectionInjectable;
