import React from 'react';
import type { ConnectionStorage, ConnectionInfo } from '@mongodb-js/connection-storage/provider';
import { InMemoryConnectionStorage } from '@mongodb-js/connection-storage/provider';
import type { AtlasService } from '@mongodb-js/atlas-service/provider';
import { type Logger } from '@mongodb-js/compass-logging/provider';
type ElectableSpecs = {
    instanceSize?: string;
};
type RegionConfig = {
    priority: number;
    electableSpecs: ElectableSpecs;
};
type ReplicationSpec = {
    regionConfigs: RegionConfig[];
};
type ClusterType = 'REPLICASET' | 'SHARDED' | 'GEOSHARDED';
type ClusterDescription = {
    '@provider': string;
    uniqueId: string;
    groupId: string;
    name: string;
    clusterType: ClusterType;
    srvAddress: string;
    state: string;
    deploymentItemName: string;
    replicationSpecList?: ReplicationSpec[];
    isPaused?: boolean;
    geoSharding?: {
        selfManagedSharding?: boolean;
    };
};
export type ClusterDescriptionWithDataProcessingRegion = ClusterDescription & {
    dataProcessingRegion: {
        regionalUrl: string;
    };
};
type ReplicaSetDeploymentItem = {
    _id: string;
    state: {
        clusterId: string;
    };
};
type ShardingDeploymentItem = {
    name: string;
    state: {
        clusterId: string;
    };
};
type Deployment = {
    replicaSets?: ReplicaSetDeploymentItem[];
    sharding?: ShardingDeploymentItem[];
};
export declare function buildConnectionInfoFromClusterDescription(driverProxyEndpoint: string, orgId: string, projectId: string, description: ClusterDescriptionWithDataProcessingRegion, deployment: Deployment, extraConnectionOptions?: Record<string, any>): ConnectionInfo;
/**
 * @internal exported for testing purposes
 */
export declare class AtlasCloudConnectionStorage extends InMemoryConnectionStorage implements ConnectionStorage {
    private atlasService;
    private orgId;
    private projectId;
    private logger;
    private extraConnectionOptions?;
    private loadAllPromise;
    constructor(atlasService: AtlasService, orgId: string, projectId: string, logger: Logger, extraConnectionOptions?: Record<string, any> | undefined);
    load({ id }: {
        id: string;
    }): Promise<ConnectionInfo | undefined>;
    private _loadAndNormalizeClusterDescriptionInfo;
    loadAll(): Promise<ConnectionInfo[]>;
}
/**
 * Only used in the sandbox to provide connection info when connecting to the
 * non-Atlas deployment
 * @internal
 */
export declare const SandboxConnectionStorageProvider: ({ value, extraConnectionOptions, children, }: {
    value: ConnectionStorage | null;
    extraConnectionOptions?: Record<string, any> | undefined;
    children: React.ReactNode;
}) => React.JSX.Element;
export declare const AtlasCloudConnectionStorageProvider: ({ orgId, projectId, children, }: {
    orgId: string;
    projectId: string;
    children: React.ReactChild;
}) => React.JSX.Element;
export {};
//# sourceMappingURL=connection-storage.d.ts.map