/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { TracerService, LogService, ActionState } from '@finos/legend-shared';
import type { LegendApplicationConfig } from '../application/LegendApplicationConfig.js';
import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager.js';
import { DocumentationService } from './DocumentationService.js';
import { AssistantService } from './AssistantService.js';
import { EventService } from './event/EventService.js';
import { ApplicationNavigationContextService } from './ApplicationNavigationContextService.js';
import type { LegendApplicationPlugin } from './LegendApplicationPlugin.js';
import { CommandService } from './CommandService.js';
import { KeyboardShortcutsService } from './KeyboardShortcutsService.js';
import { TerminalService } from './TerminalService.js';
import { AlertService } from './AlertService.js';
import { NotificationService } from './NotificationService.js';
import { IdentityService } from './IdentityService.js';
import { StorageService } from './storage/StorageService.js';
import { TelemetryService } from './TelemetryService.js';
import { TimeService } from './TimeService.js';
import { LayoutService } from './LayoutService.js';
import { ClipboardService } from './ClipboardService.js';
import { NavigationService } from './navigation/NavigationService.js';
import { SettingService } from './SettingService.js';
import type { ApplicationPlatform } from './platform/ApplicationPlatform.js';
import { UserDataService } from './UserDataService.js';
import { ReleaseNotesService } from './ReleaseNotesService.js';
export type GenericLegendApplicationStore = ApplicationStore<LegendApplicationConfig, LegendApplicationPluginManager<LegendApplicationPlugin>>;
export declare abstract class ApplicationExtensionState {
    /**
     * This helps to better type-check for this empty abtract type
     * See https://github.com/finos/legend-studio/blob/master/docs/technical/typescript-usage.md#understand-typescript-structual-type-system
     */
    private readonly _$nominalTypeBrand;
    abstract get INTERNAL__identifierKey(): string;
}
export declare class ApplicationStore<T extends LegendApplicationConfig, V extends LegendApplicationPluginManager<LegendApplicationPlugin>> {
    readonly uuid: string;
    accessToken: string | undefined;
    /**
     * This is a mechanism to have the store holds references to extension states
     * so that we can refer back to these states when needed or do cross-extensions
     * operations
     */
    readonly extensionStates: ApplicationExtensionState[];
    readonly config: T;
    readonly pluginManager: V;
    readonly initState: ActionState;
    readonly platform?: ApplicationPlatform | undefined;
    readonly timeService: TimeService;
    readonly logService: LogService;
    readonly storageService: StorageService;
    readonly userDataService: UserDataService;
    readonly settingService: SettingService;
    readonly alertService: AlertService;
    readonly notificationService: NotificationService;
    readonly identityService: IdentityService;
    readonly commandService: CommandService;
    readonly keyboardShortcutsService: KeyboardShortcutsService;
    readonly layoutService: LayoutService;
    readonly clipboardService: ClipboardService;
    readonly terminalService: TerminalService;
    readonly navigationService: NavigationService;
    readonly navigationContextService: ApplicationNavigationContextService;
    readonly documentationService: DocumentationService;
    readonly assistantService: AssistantService;
    readonly releaseNotesService: ReleaseNotesService;
    readonly eventService: EventService;
    readonly telemetryService: TelemetryService;
    readonly tracerService: TracerService;
    constructor(config: T, pluginManager: V);
    initialize(platform: ApplicationPlatform): Promise<void>;
    /**
     * When we call store/state functions from the component, we should handle error thrown at these functions instead
     * of throwing them to the UI. This enforces that by throwing `IllegalStateError`
     */
    alertUnhandledError: (error: Error) => void;
    logUnhandledError: (error: Error) => void;
    /**
     * Stores the OIDC access token in memory and syncs it to a browser cookie
     * (`legend-access-token`) so that HTTP clients using `credentials: 'include'`
     * automatically send it with every request.
     */
    setAccessToken(token: string | undefined, maxAge?: number): void;
    getAccessToken(): string | undefined;
    private _syncAccessTokenCookie;
    /**
     * Guarantee that the action being used by the component does not throw unhandled errors
     */
    guardUnhandledError: (actionFn: () => Promise<void>) => (() => void);
}
//# sourceMappingURL=ApplicationStore.d.ts.map