import { BaseCommand } from './base.js';
import * as constants from '../core/constants.js';
import { type KeyManager } from '../core/key-manager.js';
import { type PlatformInstaller } from '../core/platform-installer.js';
import { type ProfileManager } from '../core/profile-manager.js';
import { type CertificateManager } from '../core/certificate-manager.js';
import { type ArgvStruct, type IP, type NodeAlias, type NodeAliases } from '../types/aliases.js';
import { type ClusterReferenceName, type ClusterReferences, type SoloListrTask } from '../types/index.js';
import { type CommandFlags } from '../types/flag-types.js';
import { NamespaceName } from '../types/namespace/namespace-name.js';
import { ConsensusNode } from '../core/model/consensus-node.js';
import { BlockNodeStateSchema } from '../data/schema/model/remote/state/block-node-state-schema.js';
import { SoloLogger } from '../core/logging/solo-logger.js';
import { K8Factory } from '../integration/kube/k8-factory.js';
export interface NetworkDeployConfigClass {
    isUpgrade: boolean;
    applicationEnv: string;
    cacheDir: string;
    chartDirectory: string;
    loadBalancerEnabled: boolean;
    soloChartVersion: string;
    namespace: NamespaceName;
    deployment: string;
    nodeAliasesUnparsed: string;
    persistentVolumeClaims: string;
    profileFile: string;
    profileName: string;
    releaseTag: string;
    keysDir: string;
    nodeAliases: NodeAliases;
    stagingDir: string;
    stagingKeysDir: string;
    valuesFile: string;
    valuesArgMap: Record<ClusterReferenceName, string>;
    grpcTlsCertificatePath: string;
    grpcWebTlsCertificatePath: string;
    grpcTlsKeyPath: string;
    grpcWebTlsKeyPath: string;
    genesisThrottlesFile: string;
    resolvedThrottlesFile: string;
    haproxyIps: string;
    envoyIps: string;
    haproxyIpsParsed?: Record<NodeAlias, IP>;
    envoyIpsParsed?: Record<NodeAlias, IP>;
    storageType: constants.StorageType;
    gcsWriteAccessKey: string;
    gcsWriteSecrets: string;
    gcsEndpoint: string;
    gcsBucket: string;
    gcsBucketPrefix: string;
    awsWriteAccessKey: string;
    awsWriteSecrets: string;
    awsEndpoint: string;
    awsBucket: string;
    awsBucketPrefix: string;
    awsBucketRegion: string;
    backupBucket: string;
    backupWriteSecrets: string;
    backupWriteAccessKey: string;
    backupEndpoint: string;
    backupRegion: string;
    backupProvider: string;
    consensusNodes: ConsensusNode[];
    contexts: string[];
    clusterRefs: ClusterReferences;
    domainNames?: string;
    domainNamesMapping?: Record<NodeAlias, string>;
    blockNodeComponents: BlockNodeStateSchema[];
    debugNodeAlias: NodeAlias;
    app: string;
    serviceMonitor: string;
    podLog: string;
    singleUseServiceMonitor: string;
    singleUsePodLog: string;
    enableMonitoringSupport: boolean;
}
interface NetworkDeployContext {
    config: NetworkDeployConfigClass;
}
export interface NetworkDestroyContext {
    config: {
        deletePvcs: boolean;
        deleteSecrets: boolean;
        namespace: NamespaceName;
        enableTimeout: boolean;
        force: boolean;
        contexts: string[];
        deployment: string;
    };
    checkTimeout: boolean;
}
export declare class NetworkCommand extends BaseCommand {
    private readonly certificateManager;
    private readonly keyManager;
    private readonly platformInstaller;
    private readonly profileManager;
    private profileValuesFile?;
    constructor(certificateManager: CertificateManager, keyManager: KeyManager, platformInstaller: PlatformInstaller, profileManager: ProfileManager);
    private static readonly DEPLOY_CONFIGS_NAME;
    static readonly DESTROY_FLAGS_LIST: CommandFlags;
    static readonly DEPLOY_FLAGS_LIST: CommandFlags;
    private waitForNetworkPods;
    private prepareMinioSecrets;
    private prepareStreamUploaderSecrets;
    private prepareBackupUploaderSecrets;
    private prepareStorageSecrets;
    /**
     * Prepare values args string for each cluster-ref
     * @param config
     */
    private prepareValuesArgMap;
    /**
     * Prepare the values argument for the helm chart for a given config
     * @param config
     */
    private prepareValuesArg;
    /**
     * Adds the template string to the argument for each record
     * @param records - the records to iterate over
     * @param consensusNodes - the consensus nodes to iterate over
     * @param valuesArguments - the values arguments to add to
     * @param templateString - the template string to add
     */
    private addArgForEachRecord;
    private prepareNamespaces;
    private prepareConfig;
    private destroyTask;
    private deleteSecrets;
    private deletePvcs;
    private crdExists;
    /**
     * Ensure the PodLogs CRD from Grafana Alloy is installed
     */
    private ensurePodLogsCrd;
    /**
     * Ensure all Prometheus Operator CRDs exist; install chart only if needed.
     * If all CRDs are already present or monitoring support is disabled, skip installation.
     */
    /** Ensure Prometheus Operator CRDs are present; install missing ones via the chart */
    private ensurePrometheusOperatorCrds;
    /** Run helm install and deploy network components */
    deploy(argv: ArgvStruct): Promise<boolean>;
    /**
     * @param consensusNode - the targeted consensus node
     * @param logger
     * @param k8Factory
     */
    static createAndCopyBlockNodeJsonFileForConsensusNode(consensusNode: ConsensusNode, logger: SoloLogger, k8Factory: K8Factory): Promise<void>;
    destroy(argv: ArgvStruct): Promise<boolean>;
    /** Adds the consensus node, envoy and haproxy components to remote config.  */
    addNodesAndProxies(): SoloListrTask<NetworkDeployContext>;
    private getBlockNodes;
    close(): Promise<void>;
}
export {};
