import { ConnectOptions, Capability, Qualifier, ParamDefinition } from '@scion/microfrontend-platform';
import { Observable } from 'rxjs';
import { Dictionary } from '@scion/toolkit/util';
import { PreDestroy } from '@scion/toolkit/bean-manager';

/**
 * Represents an object that can be disposed of to free up resources.
 */
interface Disposable {
    /**
     * Disposes of the object, releasing any allocated resources.
     */
    dispose(): void;
}

/**
 * Built-in workbench capabilities.
 */
declare enum WorkbenchCapabilities {
    /**
     * Contributes a workbench part.
     *
     * A part is a visual element of the workbench layout. Parts can be docked to the side or
     * positioned relative to each other. A part can display content or stack views.
     */
    Part = "part",
    /**
     * Contributes a workbench view.
     *
     * A view is a visual element of the workbench layout for displaying content stacked or side-by-side.
     */
    View = "view",
    /**
     * Contributes a workbench perspective.
     *
     * A perspective defines an arrangement of parts and views. Users can switch between perspectives. Perspectives share the same main area, if any.
     */
    Perspective = "perspective",
    /**
     * Contributes a workbench popup.
     *
     * A popup is a visual workbench element for displaying content above other content.
     */
    Popup = "popup",
    /**
     * Contributes a workbench dialog.
     *
     * A dialog is a visual element for focused interaction with the user, such as prompting the user for input or confirming actions.
     */
    Dialog = "dialog",
    /**
     * Contributes a workbench message box.
     *
     * A message box is a standardized dialog for presenting a message to the user, such as an info, warning or alert,
     * or for prompting the user for confirmation.
     */
    MessageBox = "messagebox",
    /**
     * Contributes a workbench notification.
     *
     * A notification is a closable message displayed in the upper-right corner that disappears after a few seconds unless hovered or focused.
     * It informs about system events, task completion, or errors. Severity indicates importance or urgency.
     */
    Notification = "notification",
    /**
     * Provides texts to the SCION Workbench and micro apps.
     */
    TextProvider = "text-provider"
}

/**
 * Signature of a function to provide texts to the SCION Workbench and micro apps.
 *
 * Texts starting with the percent symbol (`%`) are passed to the text provider for translation, with the percent symbol omitted.
 *
 * A text provider can be registered via {@link WorkbenchClient.registerTextProvider} in the Activator.
 *
 * @param key - Translation key of the text.
 * @param params - Parameters used for text interpolation.
 * @return Text associated with the key, or `undefined` if not found.
 *         Localized applications should return an Observable with the text in the current language, and emit the translated text each time when the language changes.
 *
 * @category Localization
 */
type WorkbenchTextProviderFn = (key: string, params: {
    [name: string]: string;
}) => Observable<string | undefined> | string | undefined;
/**
 * Represents either a text or a key for translation.
 *
 * A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
 *
 * Key and parameters are passed to the registered text provider for translation. Applications can register a text provider
 * using {@link WorkbenchClient.registerTextProvider}.
 *
 * Semicolons in interpolation parameters must be escaped with two backslashes (`\\;`).
 *
 * Examples:
 * - `%key`: translation key
 * - `%key;param=value`: translation key with a single interpolation parameter
 * - `%key;param1=value1;param2=value2`: translation key with multiple interpolation parameters
 * - `text`: no translation key, text is returned as is
 *
 * @category Localization
 */
type Translatable = string | `%${string}`;

/**
 * **SCION Workbench Client provides core API for a web app to interact with SCION Workbench and other microfrontends.**
 *
 * It is a pure TypeScript library based on the framework-agnostic `@scion/microfrontend-platform` library and can be used with any web stack.
 *
 * You can use the `Beans` object to get references to services to interact with the SCION Workbench and the SCION Microfrontend Platform.
 *
 * #### Core services include:
 *
 * - {@link WorkbenchRouter} for navigating to a microfrontend in a workbench view.
 * - {@link WorkbenchView} for the microfrontend to interact with the view.
 * - {@link WorkbenchPart} for the microfrontend to interact with the part.
 * - {@link WorkbenchDialogService} for displaying a microfrontend in a dialog.
 * - {@link WorkbenchDialog} for the microfrontend to interact with the dialog.
 * - {@link WorkbenchPopupService} for displaying a microfrontend in a popup.
 * - {@link WorkbenchPopup} for the microfrontend to interact with the popup.
 * - {@link WorkbenchMessageBoxService} for displaying a message.
 * - {@link WorkbenchMessageBox} for the microfrontend to interact with the message box.
 * - {@link WorkbenchNotificationService} for displaying a notification.
 * - {@link WorkbenchNotification} for the microfrontend to interact with the notification.
 *
 * - `MessageClient` for sending or receiving messages between micro applications.
 * - `IntentClient` for issuing or receiving intents between micro applications.
 * - `ManifestService` for reading and registering capabilities at runtime.
 * - `SciRouterOutletElement` for embedding microfrontends.
 * - `OutletRouter` for navigating to a site in a router outlet element.
 * - `ContextService` for looking up contextual data set on a router outlet.
 * - `PreferredSizeService` for a microfrontend to report its preferred size.
 * - `FocusMonitor` for observing if the microfrontend has received focus or contains embedded web content that has received focus.
 *
 * For example, you can obtain the workbench router as follows:
 *
 * ```ts
 * const router = Beans.get(WorkbenchRouter)
 * ```
 *
 * Below is a summary of the core concepts of the SCION Microfrontend Platform.
 *
 * #### Host Application and Micro Applications
 * The host application, sometimes also called the container application, provides the top-level integration container for microfrontends. Typically, it is the web app
 * which the user loads into his browser and provides the main application shell, defining areas to embed microfrontends. The host application has SCION Workbench installed,
 * registers micro apps and starts the SCION Microfrontend Platform in host mode.
 *
 * A micro application deals with well-defined business functionality. It is a regular web application that provides one or more microfrontends. SCION Microfrontend Platform
 * uses iframes to embed microfrontends; thus, any web page can be integrated as a microfrontend. A micro application can communicate with other micro applications safely
 * using the platform's cross-origin messaging API. A micro application has to provide an application manifest which to register in the host application.
 *
 * For more information, see the chapter [Core Concepts](https://microfrontend-platform-developer-guide.scion.vercel.app/#_core_concepts)
 * of the SCION Microfrontend Platform Developer's Guide.
 *
 * #### Embedding of Microfrontends
 * You can embed microfrontends using the `<sci-router-outlet>` web component. Web content displayed in the web component is controlled via the `OutletRouter`.
 *
 * For more information, see the chapter [Embedding Microfrontends](https://microfrontend-platform-developer-guide.scion.vercel.app/#chapter:embedding-microfrontends)
 * of the SCION Microfrontend Platform Developer's Guide.
 *
 * #### Cross-Application Communication
 * You can interact with other micro applications via messaging or through so-called intents. Intents are a mechanism known from Android development,
 * enabling controlled collaboration across application boundaries.
 *
 * For more information, see the chapters [Cross-Application Communication](https://microfrontend-platform-developer-guide.scion.vercel.app/#chapter:cross-application-communication)
 * and [Intention API](https://microfrontend-platform-developer-guide.scion.vercel.app/#chapter:intention-api) of the SCION Microfrontend Platform Developer's Guide.
 *
 * #### Activation
 * You can provide an activator to connect to the platform when the user loads the host app into his browser, allowing to initialize and install message listeners for interacting
 * with other micro applications. Starting an activator may take some time. In order not to miss any messages, you can instruct the platform host to wait until you signal
 * readiness.
 *
 * For more information, see the chapter [Activator](https://microfrontend-platform-developer-guide.scion.vercel.app/#chapter:activator) of the SCION Microfrontend
 * Platform Developer's Guide.
 *
 * See our [Developer's Guide](https://microfrontend-platform-developer-guide.scion.vercel.app) for the full documentation about the
 * [SCION Microfrontend Platform](https://github.com/SchweizerischeBundesbahnen/scion-microfrontend-platform).
 */
declare class WorkbenchClient {
    private constructor();
    /**
     * Connects the micro application to the SCION Workbench and SCION Microfrontend Platform.
     *
     * After connected, the micro application can interact with the workbench and other micro applications. Typically, the
     * micro application connects to the workbench during the bootstrapping. In Angular, for example, this can be done in
     * an app initializer.
     *
     * See {@link @scion/microfrontend-platform!MicrofrontendPlatformClient.connect} for more information about connecting to the platform host.
     *
     * @param  symbolicName - Specifies the symbolic name of the micro application. The micro application needs to be registered
     *         in the workbench under that identity.
     * @param  connectOptions - Controls how to connect to the workbench.
     * @return A Promise that resolves once connected to the workbench, or that rejects otherwise.
     */
    static connect(symbolicName: string, connectOptions?: ConnectOptions): Promise<void>;
    /**
     * Provides texts to the SCION Workbench and micro apps.
     *
     * A text provider is a function that returns the text for a translation key.
     *
     * Texts starting with the percent symbol (`%`) are passed to the text provider for translation, with the percent symbol omitted.
     *
     * This function must be called in an Activator. Refer to {@link @scion/microfrontend-platform!ActivatorCapability} for details on activators.
     *
     * Applications can use {@link WorkbenchTextService} to get texts from other micro applications.
     *
     * @param textProvider - Function to provide the text for a translation key.
     * @return Object to unregister the text provider.
     */
    static registerTextProvider(textProvider: WorkbenchTextProviderFn): Disposable;
}

/**
 * Format of a view identifier.
 *
 * @category View
 */
type ViewId = `view.${string}`;
/**
 * Format of a part identifier.
 *
 * @category Part
 */
type PartId = `part.${string}`;
/**
 * Format of a dialog identifier.
 *
 * @category Dialog
 */
type DialogId = `dialog.${string}`;
/**
 * Format of a popup identifier.
 *
 * @category Popup
 */
type PopupId = `popup.${string}`;
/**
 * Format of a notification identifier.
 *
 * @category Notification
 */
type NotificationId = `notification.${string}`;
/**
 * Format of an activity identifier.
 *
 * @docs-private Not public API. For internal use only.
 */
type ActivityId = `activity.${string}`;

/**
 * Defines command endpoints for the communication between SCION Workbench and SCION Workbench Client.
 *
 * @docs-private Not public API. For internal use only.
 */
declare const ɵWorkbenchCommands: {
    /**
     * Computes the topic via which the title of a workbench view tab can be set.
     */
    readonly viewTitleTopic: (viewId: ViewId | ":viewId") => string;
    /**
     * Computes the topic via which the heading of a workbench view tab can be set.
     */
    readonly viewHeadingTopic: (viewId: ViewId | ":viewId") => string;
    /**
     * Computes the topic via which a view tab can be marked dirty or pristine.
     */
    readonly viewDirtyTopic: (viewId: ViewId | ":viewId") => string;
    /**
     * Computes the topic via which a view tab can be made closable.
     */
    readonly viewClosableTopic: (viewId: ViewId | ":viewId") => string;
    /**
     * Computes the topic via which a view can be closed.
     */
    readonly viewCloseTopic: (viewId: ViewId | ":viewId") => string;
    /**
     * Computes the topic to notify the active state of a view.
     *
     * The active state is published as a retained message.
     */
    readonly viewActiveTopic: (viewId: ViewId) => string;
    /**
     * Computes the topic to notify the active state of a part.
     *
     * The active state is published as a retained message.
     */
    readonly partActiveTopic: (partId: PartId) => string;
    /**
     * Computes the topic to notify the focused state of a view.
     *
     * The focused state is published as a retained message.
     */
    readonly viewFocusedTopic: (viewId: ViewId) => string;
    /**
     * Computes the topic to notify the focused state of a part.
     *
     * The focused state is published as a retained message.
     */
    readonly partFocusedTopic: (partId: PartId) => string;
    /**
     * Computes the topic to notify the part of a view.
     *
     * The part identity is published as a retained message.
     */
    readonly viewPartIdTopic: (viewId: ViewId) => string;
    /**
     * Computes the topic to request closing confirmation of a view.
     *
     * When closing a view and if the microfrontend has subscribed to this topic, the workbench requests closing confirmation
     * via this topic. By sending a `true` reply, the workbench continues with closing the view, by sending a `false` reply,
     * closing is prevented.
     */
    readonly canCloseTopic: (viewId: ViewId) => string;
    /**
     * Computes the topic for signaling that a microfrontend is about to be replaced by a microfrontend of another app.
     */
    readonly viewUnloadingTopic: (viewId: ViewId) => string;
    /**
     * Computes the topic for updating params of a microfrontend view.
     */
    readonly viewParamsUpdateTopic: (viewId: ViewId, viewCapabilityId: string) => string;
    /**
     * Computes the topic for providing params to a view microfrontend.
     *
     * Params include the {@link ɵMicrofrontendRouteParams#ɵVIEW_CAPABILITY_ID capability id} and params as passed in {@link WorkbenchNavigationExtras.params}.
     *
     * Params are published as a retained message.
     */
    readonly viewParamsTopic: (viewId: ViewId) => string;
    /**
     * Computes the topic for observing the popup origin.
     */
    readonly popupOriginTopic: (popupId: PopupId) => string;
    /**
     * Computes the topic to notify the focused state of a popup.
     *
     * The focused state is published as a retained message.
     */
    readonly popupFocusedTopic: (popupId: PopupId) => string;
    /**
     * Computes the topic via which a popup can be closed.
     */
    readonly popupCloseTopic: (popupId: PopupId) => string;
    /**
     * Computes the topic via which to set a result
     */
    readonly popupResultTopic: (popupId: PopupId) => string;
    /**
     * Computes the topic via which the title of a dialog can be set.
     */
    readonly dialogTitleTopic: (dialogId: DialogId) => string;
    /**
     * Computes the topic to notify the focused state of a dialog.
     *
     * The focused state is published as a retained message.
     */
    readonly dialogFocusedTopic: (dialogId: DialogId) => string;
    /**
     * Computes the topic via which a dialog can be closed.
     */
    readonly dialogCloseTopic: (dialogId: DialogId) => string;
    /**
     * Computes the topic to notify the focused state of a notification.
     *
     * The focused state is published as a retained message.
     */
    readonly notificationFocusedTopic: (notificationId: NotificationId) => string;
    /**
     * Computes the topic via which a notification can be closed.
     */
    readonly notificationCloseTopic: (notificationId: NotificationId) => string;
};

/**
 * A part is a visual element of the workbench layout. Parts can be docked to the side or positioned relative to each other.
 * A part can display content or stack views.
 *
 * The arrangement of parts is defined in a {@link WorkbenchPerspectiveCapability}. Each part defined in the perspective references
 * a part capability to contribute content, either a microfrontend, a stack of views, or both. If both, the microfrontend is displayed
 * only if the view stack is empty. Views in a docked part cannot be dragged into or out of docked parts.
 *
 * The microfrontend can inject the `WorkbenchPart` handle (and `ActivatedMicrofrontend` if a host microfrontend) to interact with the part or access parameters.
 *
 * @category Part
 * @see WorkbenchPart
 */
interface WorkbenchPartCapability extends Capability {
    /**
     * @inheritDoc
     */
    type: WorkbenchCapabilities.Part;
    /**
     * Qualifies the part. The qualifier is required for a part.
     *
     * @inheritDoc
     */
    qualifier: Qualifier;
    /**
     * Specifies parameters required by the part.
     *
     * Parameters can be:
     * - read in the microfrontend by injecting the {@link WorkbenchPart} handle (or `ActivatedMicrofrontend` if a host microfrontend)
     * - referenced in the path, title, label, tooltip and resolvers using the colon syntax
     *
     * @inheritDoc
     */
    params?: ParamDefinition[];
    /**
     * @inheritDoc
     */
    properties?: {
        /**
         * Specifies the path to the microfrontend.
         *
         * The path is relative to the base URL given in the application manifest, or to the origin of the manifest file if no base URL is specified.
         *
         * Path segments can reference capability parameters using the colon syntax.
         *
         * ```json
         * {
         *   "params": [
         *     {"name": "read", "required": false}
         *   ],
         *   "properties": {
         *     "path": "tasks?read=:read", // `:read` references a capability parameter
         *   }
         * }
         * ```
         *
         * If the part contains views, the microfrontend is displayed only if the view stack is empty.
         *
         * ### Empty Path Required if Host Capability
         * Part capabilities of the host application require an empty path. In the route, use `canMatchWorkbenchPartCapability` guard to match the part capability.
         *
         * @example - Route matching a part capability with qualifier {part: 'navigator'}
         * ```ts
         * import {Routes} from '@angular/router';
         * import {canMatchWorkbenchPartCapability} from '@scion/workbench';
         *
         * const routes: Routes = [
         *   {path: '', canMatch: [canMatchWorkbenchPartCapability({part: 'navigator'})], component: NavigatorComponent},
         * ];
         */
        path?: string;
        /**
         * Specifies views to stack in the part.
         *
         * Microfrontends provided as view capability can be referenced. Views are stacked in declaration order.
         *
         * Declaring an intention allows for referencing public view capabilities of other applications. If a view capability cannot be resolved, the view
         * is omitted, allowing conditional display, for example, based on user permissions.
         *
         * If a docked part, views cannot be dragged in or out.
         */
        views?: WorkbenchViewRef[];
        /**
         * Specifies the title displayed in the part bar.
         *
         * Defaults to {@link extras.label} if a docked part. Set to `false` to not display a title.
         *
         * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
         *
         * Text and interpolation parameters can reference capability parameters and resolvers using the colon syntax. See {@link resolve} for defining resolvers.
         */
        title?: Translatable | false;
        /**
         * Controls the appearance of a docked part and its toggle button.
         *
         * A docked part is a part that is docked to the left, right, or bottom side of the workbench.
         *
         * This property only applies to docked parts. The perspective determines whether a part is docked or positioned relative to another part.
         */
        extras?: DockedPartExtras;
        /**
         * Defines resolvers for use in the title, label and tooltip.
         *
         * A resolver defines a topic where a request is sent to resolve text or a translation key, typically based on capability parameters. Topic segments can reference capability parameters using the colon syntax.
         *
         * The application can respond to resolve requests by installing a message listener in the activator. Refer to {@link ActivatorCapability} for registering an activator.
         *
         * @example - Message listener replying to resolve requests
         *
         * ```ts
         * import {Beans} from '@scion/toolkit/bean-manager';
         * import {MessageClient} from '@scion/microfrontend-platform';
         *
         * Beans.get(MessageClient).onMessage('tasks/count', message => {
         *   return ...;
         * });
         * ```
         */
        resolve?: {
            [name: string]: string;
        };
        /**
         * Instructs the workbench to show a splash, such as a skeleton or loading indicator, until the microfrontend signals readiness.
         *
         * By default, the workbench shows a loading indicator. A custom splash can be configured in the workbench host application.
         *
         * This property only applies to the microfrontend loaded into the part, not views stacked in the part.
         *
         * This property is not supported if a host microfrontend.
         *
         * @see WorkbenchPart.signalReady
         */
        showSplash?: boolean;
        /**
         * Specifies CSS class(es) to add to the part, e.g., to locate the part in tests.
         */
        cssClass?: string | string[];
        /**
         * Arbitrary metadata associated with the capability.
         */
        [key: string]: unknown;
    };
}
/**
 * Controls the appearance of a docked part and its toggle button.
 *
 * A docked part is a part that is docked to the left, right, or bottom side of the workbench.
 */
interface DockedPartExtras {
    /**
     * Specifies the icon (key) displayed in the toggle button.
     *
     * Refer to the documentation of the workbench host application for available icons.
     */
    icon: string;
    /**
     * Specifies the label displayed in the toggle button.
     *
     * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
     *
     * Text and interpolation parameters can reference capability parameters and resolvers using the colon syntax. See {@link resolve} for defining resolvers.
     */
    label: Translatable;
    /**
     * Specifies the tooltip displayed when hovering over the toggle button.
     *
     * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
     *
     * Text and interpolation parameters can reference capability parameters and resolvers using the colon syntax. See {@link resolve} for defining resolvers.
     */
    tooltip?: Translatable;
}
/**
 * Describes a view referenced in a part.
 */
interface WorkbenchViewRef {
    /**
     * Specifies the {@link WorkbenchViewCapability} that provides the view microfrontend.
     *
     * Declaring an intention allows for referencing public view capabilities of other applications.
     *
     * If the view capability cannot be resolved, the view is omitted, allowing conditional display, for example, based on user permissions.
     */
    qualifier: Qualifier;
    /**
     * Defines data to pass to the view.
     *
     * The view can declare mandatory and optional parameters. No additional parameters are allowed. Refer to the documentation of the capability for more information.
     */
    params?: {
        [name: string]: unknown;
    };
    /**
     * Controls whether to activate the view. If not specified, activates the first view of the stack.
     */
    active?: boolean;
    /**
     * Specifies CSS class(es) to add to the view, e.g., to locate the view in tests.
     */
    cssClass?: string | string[];
}

/**
 * A part is a visual element of the workbench layout. Parts can be docked to the side or
 * positioned relative to each other. A part can display content or stack views.
 *
 * The part microfrontend can inject this handle to interact with the part.
 *
 * @category Part
 * @see WorkbenchPartCapability
 */
declare abstract class WorkbenchPart {
    /**
     * Identity of this part.
     */
    abstract readonly id: PartId;
    /**
     * Signals readiness, notifying the workbench that this part has completed initialization.
     *
     * If `showSplash` is set to `true` on the part capability, the workbench displays a splash until the part microfrontend signals readiness.
     *
     * @see WorkbenchPartCapability.properties.showSplash
     */
    abstract signalReady(): void;
    /**
     * Capability of the microfrontend loaded into the part.
     */
    abstract readonly capability: WorkbenchPartCapability;
    /**
     * Parameters passed to the microfrontend loaded into the part.
     */
    abstract readonly params: Map<string, unknown>;
    /**
     * Indicates whether this part is active.
     *
     * Upon subscription, emits the active state of this part, and then emits continuously when it changes.
     * The Observable never completes.
     */
    abstract readonly active$: Observable<boolean>;
    /**
     * Indicates whether this part has the focus.
     *
     * Upon subscription, emits the focused state of this part, and then emits continuously when it changes.
     * The Observable never completes.
     */
    abstract readonly focused$: Observable<boolean>;
}

/**
 * A view is a visual element of the workbench layout for displaying content stacked or side-by-side.
 *
 * A view capability can be opened via {@link WorkbenchRouter} or added to a perspective in a {@link WorkbenchPartCapability}.
 *
 * The microfrontend can inject the `WorkbenchView` handle (and `ActivatedMicrofrontend` if a host microfrontend) to interact with the view or access parameters.
 *
 * @category View
 * @see WorkbenchView
 */
interface WorkbenchViewCapability extends Capability {
    /**
     * @inheritDoc
     */
    type: WorkbenchCapabilities.View;
    /**
     * Qualifies the view. The qualifier is required for a view.
     *
     * @inheritDoc
     */
    qualifier: Qualifier;
    /**
     * Specifies parameters required by the view.
     *
     * Parameters can be:
     * - read in the microfrontend by injecting the {@link WorkbenchView} handle (or `ActivatedMicrofrontend` if a host microfrontend)
     * - referenced in the path, title and resolvers using the colon syntax
     *
     * @inheritDoc
     */
    params?: ViewParamDefinition[];
    /**
     * @inheritDoc
     */
    properties: {
        /**
         * Specifies the path to the microfrontend.
         *
         * The path is relative to the base URL given in the application manifest, or to the origin of the manifest file if no base URL is specified.
         *
         * Path segments can reference capability parameters using the colon syntax.
         *
         * ```json
         * {
         *   "params": [
         *     {"name": "id", "required": true}
         *   ],
         *   "properties": {
         *     "path": "products/:id", // `:id` references a capability parameter
         *   }
         * }
         * ```
         * ### Empty Path Required if Host Capability
         * View capabilities of the host application require an empty path. In the route, use `canMatchWorkbenchViewCapability` guard to match the view capability.
         *
         * @example - Route matching a view capability with qualifier {view: 'search'}
         * ```ts
         * import {Routes} from '@angular/router';
         * import {canMatchWorkbenchViewCapability} from '@scion/workbench';
         *
         * const routes: Routes = [
         *   {path: '', canMatch: [canMatchWorkbenchViewCapability({view: 'search'})], component: SearchComponent},
         * ];
         * ```
         */
        path: string;
        /**
         * Controls if to load the microfrontend only when activating the view tab. Defaults to `true`.
         *
         * Requires configuration of {@link title} and {@link heading} in the manifest.
         *
         * This property is not supported if a host microfrontend.
         */
        lazy?: boolean;
        /**
         * Specifies the title of the view tab.
         *
         * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
         *
         * Text and interpolation parameters can reference capability parameters and resolvers using the colon syntax. See {@link resolve} for defining resolvers.
         *
         * @example - Title referencing a resolver
         *
         * ```json
         * {
         *   "params": [
         *     {"name": "id", "required": true}
         *   ],
         *   "properties": {
         *     "title": ":productName", // `:productName` references a resolver
         *     "resolve": {
         *       "productName": "products/:id/name" // `:id` references a capability parameter
         *     }
         *   }
         * }
         * ```
         *
         * @example - Translatable title referencing a resolver in its interpolation parameters
         *
         * ```json
         * {
         *   "params": [
         *     {"name": "id", "required": true}
         *   ],
         *   "properties": {
         *     "title": "%product.title;name=:productName", // `:productName` references a resolver
         *     "resolve": {
         *       "productName": "products/:id/name" // `:id` references a capability parameter
         *     }
         *   }
         * }
         * ```
         */
        title?: Translatable;
        /**
         * Specifies the subtitle of the view tab.
         *
         * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
         *
         * Text and interpolation parameters can reference capability parameters and resolvers using the colon syntax. See {@link resolve} for defining resolvers.
         *
         * @example - Heading referencing a resolver
         *
         * ```json
         * {
         *   "params": [
         *     {"name": "id", "required": true}
         *   ],
         *   "properties": {
         *     "heading": ":productCategory", // `:productCategory` references a resolver
         *     "resolve": {
         *      "productCategory": "products/:id/category" // `:id` references a capability parameter
         *     }
         *   }
         * }
         * ```
         *
         * @example - Translatable heading referencing a resolver in its interpolation parameters
         *
         * ```json
         * {
         *   "params": [
         *     {"name": "id", "required": true}
         *   ],
         *   "properties": {
         *     "heading": "%product_category.title;category=:productCategory", // `:productCategory` references a resolver
         *     "resolve": {
         *       "productCategory": "products/:id/category" // `:id` references a capability parameter
         *     }
         *   }
         * }
         * ```
         */
        heading?: Translatable;
        /**
         * Defines resolvers for use in the view title and heading.
         *
         * A resolver defines a topic where a request is sent to resolve text or a translation key, typically based on capability parameters. Topic segments can reference capability parameters using the colon syntax.
         *
         * The application can respond to resolve requests by installing a message listener in the activator. Refer to {@link ActivatorCapability} for registering an activator.
         *
         * @example - Message listener replying to resolve requests
         *
         * ```ts
         * import {Beans} from '@scion/toolkit/bean-manager';
         * import {MessageClient} from '@scion/microfrontend-platform';
         *
         * Beans.get(MessageClient).onMessage('products/:id/name', message => {
         *   const id = message.params.get('id');
         *   return `Product ${id}`;
         * });
         * ```
         */
        resolve?: {
            [name: string]: string;
        };
        /**
         * Controls if to display a close button in the view tab. Defaults to `true`.
         */
        closable?: boolean;
        /**
         * Instructs the workbench to show a splash, such as a skeleton or loading indicator, until the view microfrontend signals readiness.
         *
         * By default, the workbench shows a loading indicator. A custom splash can be configured in the workbench host application.
         *
         * This property is not supported if a host microfrontend.
         *
         * @see WorkbenchView.signalReady
         */
        showSplash?: boolean;
        /**
         * Specifies CSS class(es) to add to the view, e.g., to locate the view in tests.
         */
        cssClass?: string | string[];
        /**
         * Arbitrary metadata associated with the capability.
         */
        [key: string]: unknown;
    };
}
/**
 * Describes a parameter to be passed along with a view intent.
 *
 * @category View
 * @inheritDoc
 */
interface ViewParamDefinition extends ParamDefinition {
    /**
     * Controls how the workbench router should pass this parameter to the workbench view.
     *
     * By default, parameters are passed via the workbench URL as matrix parameters.
     * Marking a parameter as "transient" instructs the router to pass it via navigational state, useful for large objects.
     *
     * Transient parameters are not persistent, they are only added to the browser's session history to support back/forward browser navigation.
     * Microfrontends must be able to restore state without relying on transient parameters.
     *
     * @deprecated since version 1.0.0-beta.36. Marked for removal. No replacement. Instead, send large data as retained message to a random topic and pass the topic as parameter. After receiving the data, the view should delete the retained message to free resources.
     */
    transient?: boolean;
    /**
     * @inheritDoc
     */
    [property: string]: any;
}

/**
 * A view is a visual workbench element for displaying content stacked or side-by-side in the workbench layout.
 *
 * Users can drag views from one part to another, even across windows, or place them side-by-side, horizontally and vertically.
 *
 * The view microfrontend can inject this handle to interact with the view.
 *
 * @category View
 * @see WorkbenchViewCapability
 */
declare abstract class WorkbenchView {
    /**
     * Identity of this view.
     */
    abstract readonly id: ViewId;
    /**
     * Signals readiness, notifying the workbench that this view has completed initialization.
     *
     * If `showSplash` is set to `true` on the view capability, the workbench displays a splash until the view microfrontend signals readiness.
     *
     * @see WorkbenchViewCapability.properties.showSplash
     */
    abstract signalReady(): void;
    /**
     * Capability of the microfrontend loaded into the view.
     *
     * Upon subscription, emits the microfrontend's capability, and then emits continuously when navigating to a different microfrontend
     * of the same application. It completes when navigating to a microfrontend of another application.
     */
    abstract readonly capability$: Observable<WorkbenchViewCapability>;
    /**
     * Parameters passed to the microfrontend loaded into the view.
     *
     * Upon subscription, emits the microfrontend's parameters, and then emits continuously when the parameters change.
     * The Observable completes when navigating to a microfrontend of another application, but not when navigating to a different microfrontend
     * of the same application.
     */
    abstract readonly params$: Observable<Map<string, unknown>>;
    /**
     * The current snapshot of this view.
     */
    abstract readonly snapshot: ViewSnapshot;
    /**
     * Indicates whether this view is active.
     *
     * Upon subscription, emits the active state of this view, and then emits continuously when it changes.
     * The Observable completes when navigating to a microfrontend of another application, but not when navigating to a different microfrontend
     * of the same application.
     */
    abstract readonly active$: Observable<boolean>;
    /**
     * Indicates whether this view has the focus.
     *
     * Upon subscription, emits the focused state of this view, and then emits continuously when it changes.
     * The Observable completes when navigating to a microfrontend of another application, but not when navigating to a different microfrontend
     * of the same application.
     */
    abstract readonly focused$: Observable<boolean>;
    /**
     * Gets the identity of the part that contains this view.
     *
     * Upon subscription, emits the identity of this view's part, and then emits continuously when it changes.
     * The Observable completes when navigating to a microfrontend of another application, but not when navigating to a different microfrontend
     * of the same application.
     */
    abstract readonly partId$: Observable<PartId>;
    /**
     * Sets the title to be displayed in the view tab.
     *
     * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
     */
    abstract setTitle(title: Translatable): void;
    /**
     * Sets the subtitle to be displayed in the view tab.
     *
     * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
     */
    abstract setHeading(heading: Translatable): void;
    /**
     * Sets whether this view is dirty or pristine. When navigating to another microfrontend, the view's dirty state is set to pristine.
     *
     * You can provide the dirty/pristine state either as a boolean or as Observable. If you pass an Observable, it will be unsubscribed when
     * navigating to another microfrontend, whether from the same app or a different one.
     *
     * If not passing an argument, the view is marked as dirty. To mark it as pristine, you need to pass `false`.
     */
    abstract markDirty(dirty?: boolean | Observable<boolean>): void;
    /**
     * Controls whether the user should be allowed to close this workbench view.
     *
     * You can provide either a boolean or Observable. If you pass an Observable, it will be unsubscribed when navigating to another microfrontend,
     * whether from the same app or a different one.
     */
    abstract setClosable(closable: boolean | Observable<boolean>): void;
    /**
     * Initiates the closing of this workbench view.
     */
    abstract close(): void;
    /**
     * Registers a guard to confirm closing the view, replacing any previous guard.
     *
     * Example:
     * ```ts
     * Beans.get(WorkbenchView).canClose(async () => {
     *   const action = await Beans.get(WorkbenchMessageBoxService).open('Do you want to save changes?', {
     *     actions: {
     *       yes: 'Yes',
     *       no: 'No',
     *       cancel: 'Cancel'
     *     }
     *   });
     *
     *   switch (action) {
     *     case 'yes':
     *       // Store changes ...
     *       return true;
     *     case 'no':
     *       return true;
     *     default:
     *       return false;
     *   }
     * });
     * ```
     *
     * @param canClose - Callback to confirm closing the view.
     * @returns Reference to the `CanClose` guard, which can be used to unregister the guard.
     */
    abstract canClose(canClose: CanCloseFn): CanCloseRef;
}
/**
 * The signature of a function to confirm closing a view., e.g., if dirty.
 */
type CanCloseFn = () => Observable<boolean> | Promise<boolean> | boolean;
/**
 * Reference to the `CanClose` guard registered on a view.
 */
interface CanCloseRef {
    /**
     * Removes the `CanClose` guard from the view.
     *
     * Has no effect if another guard was registered in the meantime.
     */
    dispose(): void;
}
/**
 * Provides information about a view displayed at a particular moment in time.
 *
 * @category View
 */
interface ViewSnapshot {
    /**
     * Capability of the microfrontend loaded into the view.
     */
    capability: WorkbenchViewCapability;
    /**
     * Parameters passed to the microfrontend loaded into the view.
     */
    params: Map<string, unknown>;
    /**
     * The identity of the part that contains the view.
     */
    partId: PartId;
    /**
     * Indicates whether this view is active.
     */
    active: boolean;
    /**
     * Indicates whether this view has the focus.
     */
    focused: boolean;
}

/**
 * Represents a microfrontend for display in a workbench dialog.
 *
 * A dialog is a visual element for focused interaction with the user, such as prompting the user for input or confirming actions.
 * The user can move and resize a dialog.
 *
 * Displayed on top of other content, a modal dialog blocks interaction with other parts of the application. A dialog can be context-modal
 * or application-modal. Dialogs are stacked per modality, with only the topmost dialog in each stack being interactive.
 *
 * The microfrontend can inject the `WorkbenchDialog` handle (and `ActivatedMicrofrontend` if a host microfrontend) to interact with the dialog or access parameters.
 *
 * Dialogs provided by the workbench host application have a footer and resize to fit content. See the documentation of `WorkbenchDialogService`
 * in `@scion/workbench` for more information on adding actions to the footer.
 *
 * Dialogs provided by other applications must specify an explicit size in {@link WorkbenchDialogCapability.properties.size} and add
 * the footer in the microfrontend.
 *
 * @category Dialog
 * @see WorkbenchDialog
 * @see WorkbenchDialogService
 */
interface WorkbenchDialogCapability extends Capability {
    /**
     * @inheritDoc
     */
    type: WorkbenchCapabilities.Dialog;
    /**
     * Qualifies the dialog. The qualifier is required for a dialog.
     *
     * @inheritDoc
     */
    qualifier: Qualifier;
    /**
     * Specifies parameters required by the dialog.
     *
     * Parameters can be:
     * - read in the microfrontend by injecting the {@link WorkbenchDialog} handle (or `ActivatedMicrofrontend` if a host microfrontend)
     * - referenced in the path, title and resolvers using the colon syntax
     *
     * @inheritDoc
     */
    params?: ParamDefinition[];
    /**
     * @inheritDoc
     */
    properties: {
        /**
         * Specifies the path to the microfrontend.
         *
         * The path is relative to the base URL given in the application manifest, or to the origin of the manifest file if no base URL is specified.
         *
         * Path segments can reference capability parameters using the colon syntax.
         *
         * ```json
         * {
         *   "params": [
         *     {"name": "id", "required": true}
         *   ],
         *   "properties": {
         *     "path": "products/:id", // `:id` references a capability parameter
         *   }
         * }
         * ```
         *
         * ### Empty Path Required if Host Capability
         * Dialog capabilities of the host application require an empty path. In the route, use `canMatchWorkbenchDialogCapability` guard to match the dialog capability.
         *
         * @example - Route matching a dialog capability with qualifier {dialog: 'about'}
         * ```ts
         * import {Routes} from '@angular/router';
         * import {canMatchWorkbenchDialogCapability} from '@scion/workbench';
         *
         * const routes: Routes = [
         *   {path: '', canMatch: [canMatchWorkbenchDialogCapability({dialog: 'about'})], component: AboutComponent},
         * ];
         * ```
         */
        path: string;
        /**
         * Specifies the size of the dialog, required if the dialog is provided by an application other than the workbench host application.
         */
        size?: WorkbenchDialogSize;
        /**
         * Specifies the title of the dialog.
         *
         * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
         *
         * Text and interpolation parameters can reference capability parameters and resolvers using the colon syntax. See {@link resolve} for defining resolvers.
         *
         * @example - Title referencing a resolver
         *
         * ```json
         * {
         *   "params": [
         *     {"name": "id", "required": true}
         *   ],
         *   "properties": {
         *     "title": ":productName", // `:productName` references a resolver
         *     "resolve": {
         *       "productName": "products/:id/name" // `:id` references a capability parameter
         *     }
         *   }
         * }
         * ```
         *
         * @example - Translatable title referencing a resolver in its interpolation parameters
         *
         * ```json
         * {
         *   "params": [
         *     {"name": "id", "required": true}
         *   ],
         *   "properties": {
         *     "title": "%product.title;name=:productName", // `:productName` references a resolver
         *     "resolve": {
         *       "productName": "products/:id/name" // `:id` references a capability parameter
         *     }
         *   }
         * }
         * ```
         */
        title?: Translatable;
        /**
         * Defines resolvers for use in the dialog title.
         *
         * A resolver defines a topic where a request is sent to resolve text or a translation key, typically based on capability parameters. Topic segments can reference capability parameters using the colon syntax.
         *
         * The application can respond to resolve requests by installing a message listener in the activator. Refer to {@link ActivatorCapability} for registering an activator.
         *
         * @example - Message listener replying to resolve requests
         *
         * ```ts
         * import {Beans} from '@scion/toolkit/bean-manager';
         * import {MessageClient} from '@scion/microfrontend-platform';
         *
         * Beans.get(MessageClient).onMessage('products/:id/name', message => {
         *   const id = message.params.get('id');
         *   return `Product ${id}`;
         * });
         * ```
         */
        resolve?: {
            [name: string]: string;
        };
        /**
         * Specifies if to display a close button in the dialog header. Defaults to `true`.
         */
        closable?: boolean;
        /**
         * Specifies if the user can resize the dialog. Defaults to `true`.
         */
        resizable?: boolean;
        /**
         * Controls if to apply a padding to the content of the dialog.
         *
         * By default, dialogs provided by the workbench host application have a padding, others do not.
         */
        padding?: boolean;
        /**
         * Instructs the workbench to show a splash, such as a skeleton or loading indicator, until the dialog microfrontend signals readiness.
         *
         * By default, the workbench shows a loading indicator. A custom splash can be configured in the workbench host application.
         *
         * This property is not supported if a host microfrontend.
         *
         * @see WorkbenchDialog.signalReady
         */
        showSplash?: boolean;
        /**
         * Specifies CSS class(es) to add to the dialog, e.g., to locate the dialog in tests.
         */
        cssClass?: string | string[];
        /**
         * Arbitrary metadata associated with the capability.
         */
        [key: string]: unknown;
    };
}
/**
 * Specifies the dialog size.
 */
interface WorkbenchDialogSize {
    /**
     * Specifies the height of the dialog, required if the dialog is provided by an application other than the workbench host application.
     */
    height?: string;
    /**
     * Specifies the width of the dialog, required if the dialog is provided by an application other than the workbench host application.
     */
    width?: string;
    /**
     * Specifies the minimum height of the dialog.
     */
    minHeight?: string;
    /**
     * Specifies the maximum height of the dialog.
     */
    maxHeight?: string;
    /**
     * Specifies the minimum width of the dialog.
     */
    minWidth?: string;
    /**
     * Specifies the maximum width of the dialog.
     */
    maxWidth?: string;
}

/**
 * Handle to interact with a dialog opened via {@link WorkbenchDialogService}.
 *
 * The dialog microfrontend can inject this handle to interact with the dialog, such as setting the title,
 * reading parameters, or closing it.
 *
 * @category Dialog
 * @see WorkbenchDialogCapability
 * @see WorkbenchDialogService
 */
declare abstract class WorkbenchDialog {
    /**
     * Identity of this dialog.
     */
    abstract readonly id: DialogId;
    /**
     * Capability of the microfrontend loaded into this dialog.
     */
    abstract readonly capability: WorkbenchDialogCapability;
    /**
     * Parameters passed to the microfrontend loaded into the dialog.
     */
    abstract readonly params: Map<string, unknown>;
    /**
     * Sets the title of the dialog.
     *
     * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
     */
    abstract setTitle(title: Translatable): void;
    /**
     * Indicates whether this dialog has the focus.
     */
    abstract readonly focused$: Observable<boolean>;
    /**
     * Signals readiness, notifying the workbench that this dialog has completed initialization.
     *
     * If `showSplash` is set to `true` on the dialog capability, the workbench displays a splash until the dialog microfrontend signals readiness.
     *
     * @see WorkbenchDialogCapability.properties.showSplash
     */
    abstract signalReady(): void;
    /**
     * Closes the dialog. Optionally, pass a result or an error to the dialog opener.
     */
    abstract close<R>(result?: R | Error): void;
}

/**
 * Represents a microfrontend for display in a workbench popup.
 *
 * A popup is a visual workbench element for displaying content above other content. The popup is positioned relative
 * to an anchor based on its preferred alignment.
 *
 * The microfrontend can inject the `WorkbenchPopup` handle (and `ActivatedMicrofrontend` if a host microfrontend) to interact with the popup or access parameters.
 *
 * @category Popup
 */
interface WorkbenchPopupCapability extends Capability {
    /**
     * @inheritDoc
     */
    type: WorkbenchCapabilities.Popup;
    /**
     * Qualifies this popup. The qualifier is required for a popup.
     *
     * @inheritDoc
     */
    qualifier: Qualifier;
    /**
     * Specifies parameters required by the popup.
     *
     * Parameters can be:
     * - read in the microfrontend by injecting the {@link WorkbenchPopup} handle (or `ActivatedMicrofrontend` if a host microfrontend)
     * - referenced in the path using the colon syntax
     *
     * @inheritDoc
     */
    params?: ParamDefinition[];
    /**
     * @inheritDoc
     */
    properties: {
        /**
         * Specifies the path to the microfrontend.
         *
         * The path is relative to the base URL given in the application manifest, or to the origin of the manifest file if no base URL is specified.
         *
         * Path segments can reference capability parameters using the colon syntax.
         *
         * ```json
         * {
         *   "params": [
         *     {"name": "id", "required": true}
         *   ],
         *   "properties": {
         *     "path": "products/:id", // `:id` references a capability parameter
         *   }
         * }
         * ```
         *
         * ### Empty Path Required if Host Capability
         * Popup capabilities of the host application require an empty path. In the route, use `canMatchWorkbenchPopupCapability` guard to match the popup capability.
         *
         * @example - Route matching a popup capability with qualifier {popup: 'info'}
         * ```ts
         * import {Routes} from '@angular/router';
         * import {canMatchWorkbenchMessageBoxCapability} from '@scion/workbench';
         *
         * const routes: Routes = [
         *   {path: '', canMatch: [canMatchWorkbenchPopupCapability({popup: 'info'})], component: InfoComponent},
         * ];
         * ```
         */
        path: string;
        /**
         * Specifies the size of the popup.
         *
         * For the popup to adapt to the size of the microfrontend content, set the size to `auto` and report the microfrontend's preferred size using
         * `PreferredSizeService` in the microfrontend.
         *
         * @example - Reporting the preferred size in the microfrontend
         * ```ts
         * import {Beans} from '@scion/toolkit/bean-manager';
         * import {PreferredSizeService} from '@scion/microfrontend-platform';
         *
         * Beans.get(PreferredSizeService).fromDimension(<Microfrontend HTMLElement>);
         * ``
         *
         * If the content can grow and shrink, e.g., if using expandable panels, position the microfrontend `absolute` to allow infinite
         * space for rendering at its preferred size.
         */
        size?: WorkbenchPopupSize;
        /**
         * Instructs the workbench to show a splash, such as a skeleton or loading indicator, until the popup microfrontend signals readiness.
         *
         * By default, the workbench shows a loading indicator. A custom splash can be configured in the workbench host application.
         *
         * This property is not supported if a host microfrontend.
         *
         * @see WorkbenchPopup.signalReady
         */
        showSplash?: boolean;
        /**
         * Specifies CSS class(es) to add to the popup, e.g., to locate the popup in tests.
         */
        cssClass?: string | string[];
        /**
         * Arbitrary metadata associated with the capability.
         */
        [key: string]: unknown;
    };
}
/**
 * Specifies the popup size.
 */
interface WorkbenchPopupSize {
    /**
     * Specifies the height of the popup, constrained by {@link minHeight} and {@link maxHeight}, if any.
     */
    height?: string | 'auto';
    /**
     * Specifies the width of the popup, constrained by {@link minWidth} and {@link maxWidth}, if any.
     */
    width?: string | 'auto';
    /**
     * Specifies the minimum height of the popup.
     */
    minHeight?: string;
    /**
     * Specifies the maximum height of the popup.
     */
    maxHeight?: string;
    /**
     * Specifies the minimum width of the popup.
     */
    minWidth?: string;
    /**
     * Specifies the maximum width of the popup.
     */
    maxWidth?: string;
}

/**
 * Information about the context in which a popup was opened.
 *
 * @deprecated since version 1.0.0-beta.34. Marked for removal. No replacement. Instead, add a parameter to the popup capability for the popup opener to pass required referrer information.
 *
 * @category Popup
 */
interface WorkbenchPopupReferrer {
    /**
     * Identity of the view if opened in the context of a view.
     */
    viewId?: ViewId;
    /**
     * Identity of the view capability if opened in the context of a view microfrontend.
     */
    viewCapabilityId?: string;
}

/**
 * A popup is a visual workbench element for displaying content above other content. The popup is positioned relative
 * to an anchor based on its preferred alignment. The anchor can be an element or a coordinate.
 *
 * The microfrontend can inject this handle to interact with the popup.
 *
 * #### Popup Size
 * Configure the popup with a fixed size in {@link WorkbenchPopupCapability.properties.size}, or report its intrinsic content
 * size using {@link @scion/microfrontend-platform!PreferredSizeService}.
 *
 * @example - Reporting the size of a microfrontend
 * ```ts
 * Beans.get(PreferredSizeService).fromDimension(<Microfrontend HTMLElement>);
 * ```
 *
 * If the content can grow and shrink, e.g., if using expandable panels, position the microfrontend `absolute` to allow infinite
 * space for rendering at its preferred size.
 *
 * Since loading a microfrontend may take time, prefer setting the popup size in the popup capability to avoid flickering when
 * opening the popup.
 *
 * @category Popup
 */
declare abstract class WorkbenchPopup {
    /**
     * Identity of this popup.
     */
    abstract readonly id: PopupId;
    /**
     * Capability of the microfrontend loaded into this popup.
     */
    abstract readonly capability: WorkbenchPopupCapability;
    /**
     * Parameters passed to the microfrontend loaded into the popup.
     */
    abstract readonly params: Map<string, unknown>;
    /**
     * Indicates whether this popup has the focus.
     */
    abstract readonly focused$: Observable<boolean>;
    /**
     * Signals readiness, notifying the workbench that this popup has completed initialization.
     *
     * If `showSplash` is set to `true` on the popup capability, the workbench displays a splash until the popup microfrontend signals readiness.
     *
     * @see WorkbenchPopupCapability.properties.showSplash
     */
    abstract signalReady(): void;
    /**
     * Provides information about the context in which this popup was opened.
     *
     * @deprecated since version 1.0.0-beta.34. Marked for removal. No replacement. Instead, add a parameter to the popup capability for the popup opener to pass required referrer information.
     */
    abstract readonly referrer: WorkbenchPopupReferrer;
    /**
     * Sets a result that will be passed to the popup opener when the popup is closed on focus loss {@link CloseStrategy#onFocusLost}.
     */
    abstract setResult<R>(result?: R): void;
    /**
     * Closes the popup. Optionally, pass a result or an error to the popup opener.
     */
    abstract close<R>(result?: R | Error): void;
}

/**
 * Represents a microfrontend for display in a workbench notification.
 *
 * A notification is a closable message displayed in the upper-right corner that disappears after a few seconds unless hovered or focused.
 * It informs about system events, task completion, or errors. Severity indicates importance or urgency.
 *
 * Notifications can be grouped. Only the most recent notification within a group is displayed.
 *
 * The microfrontend can inject the `WorkbenchNotification` handle (and `ActivatedMicrofrontend` if a host microfrontend) to interact with the notification or access parameters.
 *
 * An explicit height must be defined in {@link WorkbenchNotificationCapability.properties.size} unless the notification is provided by the host app.
 *
 * @category Notification
 * @see WorkbenchNotification
 * @see WorkbenchNotificationService
 */
interface WorkbenchNotificationCapability extends Capability {
    /**
     * @inheritDoc
     */
    type: WorkbenchCapabilities.Notification;
    /**
     * Qualifies the notification. The qualifier is required for a notification.
     *
     * @inheritDoc
     */
    qualifier: Qualifier;
    /**
     * Specifies parameters required by the notification.
     *
     * Parameters can be:
     * - read in the microfrontend by injecting the {@link WorkbenchNotification} handle (or `ActivatedMicrofrontend` if a host microfrontend)
     * - referenced in the path using the colon syntax
     *
     * @inheritDoc
     */
    params?: ParamDefinition[];
    /**
     * @inheritDoc
     */
    properties: {
        /**
         * Specifies the path to the microfrontend.
         *
         * The path is relative to the base URL given in the application manifest, or to the origin of the manifest file if no base URL is specified.
         *
         * Path segments can reference capability parameters using the colon syntax.
         *
         * ```json
         * {
         *   "params": [
         *     {"name": "id", "required": true}
         *   ],
         *   "properties": {
         *     "path": "products/:id", // `:id` references a capability parameter
         *   }
         * }
         * ```
         *
         * ### Empty Path Required if Host Capability
         * Notification capabilities of the host application require an empty path. In the route, use `canMatchWorkbenchNotificationCapability` guard to match the notification capability.
         *
         * @example - Route matching a notification capability with qualifier {notification: 'info'}
         * ```ts
         * import {Routes} from '@angular/router';
         * import {canMatchWorkbenchNotificationCapability} from '@scion/workbench';
         *
         * const routes: Routes = [
         *   {path: '', canMatch: [canMatchWorkbenchNotificationCapability({notification: 'info'})], component: InfoComponent},
         * ];
         * ```
         */
        path: string;
        /**
         * Specifies the size of the notification, required for notifications provided by applications other than the workbench host application.
         *
         * For the notification to adapt to the size of the microfrontend content, set the size to `auto` and report the microfrontend's preferred size using
         * `PreferredSizeService` in the microfrontend.
         *
         * @example - Reporting the preferred size in the microfrontend
         * ```ts
         * import {Beans} from '@scion/toolkit/bean-manager';
         * import {PreferredSizeService} from '@scion/microfrontend-platform';
         *
         * Beans.get(PreferredSizeService).fromDimension(<Microfrontend HTMLElement>);
         * ``
         */
        size?: WorkbenchNotificationSize;
        /**
         * Enables aggregation of parameters of notifications of the same group.
         *
         * To aggregate parameters, define a topic that receives a 'reduce' request before showing a new notification if one of the same group is already showing.
         * This request contains both previous and new parameters. Respond with the parameters for the new notification.
         *
         * @example - Replies to reduce requests sent to topic `notifications/reducer`, counting notifications.
         * ```ts
         * import {Beans} from '@scion/toolkit/bean-manager';
         * import {MessageClient} from '@scion/microfrontend-platform';
         *
         * Beans.get(MessageClient).onMessage<{prevParams: Record<string, unknown>; currParams: Record<string, unknown>}>('notifications/reducer', request => {
         *   const {prevParams, currParams} = request.body!;
         *
         *   const count = (prevParams['count'] ?? 0) as number;
         *   return {...currParams, count: count + 1};
         * });
         * ```
         */
        groupParamsReducer?: string;
        /**
         * Instructs the workbench to show a splash, such as a skeleton or loading indicator, until the notification microfrontend signals readiness.
         *
         * By default, the workbench shows a loading indicator. A custom splash can be configured in the workbench host application.
         *
         * This property is not supported if a host microfrontend.
         *
         * @see WorkbenchNotification.signalReady
         */
        showSplash?: boolean;
        /**
         * Specifies CSS class(es) to add to the notification, e.g., to locate the notification in tests.
         */
        cssClass?: string | string[];
        /**
         * Arbitrary metadata associated with the capability.
         */
        [key: string]: unknown;
    };
}
/**
 * Specifies the notification size.
 */
interface WorkbenchNotificationSize {
    /**
     * Specifies the height of the notification, required if the notification is provided by an application other than the workbench host application.
     */
    height?: string | 'auto';
    /**
     * Specifies the minimum height of the notification.
     */
    minHeight?: string;
    /**
     * Specifies the maximum height of the notification.
     */
    maxHeight?: string;
}

/**
 * Handle to interact with a notification opened via {@link WorkbenchNotificationService}.
 *
 * The notification microfrontend can inject this handle to interact with the notification,
 * such as reading parameters or signaling readiness.
 *
 * @category Notification
 * @see WorkbenchNotificationCapability
 * @see WorkbenchNotificationService
 */
declare abstract class WorkbenchNotification {
    /**
     * Identity of this notification.
     */
    abstract readonly id: NotificationId;
    /**
     * Capability of the microfrontend loaded into this notification.
     */
    abstract readonly capability: WorkbenchNotificationCapability;
    /**
     * Parameters as passed by the notification opener.
     */
    abstract readonly params: Map<string, unknown>;
    /**
     * Provides information about where the notification was opened.
     */
    abstract readonly referrer: {
        /**
         * Symbolic name of the application that opened the notification.
         */
        readonly appSymbolicName: string;
    };
    /**
     * Indicates whether this notification has the focus.
     */
    abstract readonly focused$: Observable<boolean>;
    /**
     * Signals readiness, notifying the workbench that this notification has completed initialization.
     *
     * If `showSplash` is set to `true` on the `notification` capability, the workbench displays a splash until the notification microfrontend signals readiness.
     *
     * @see WorkbenchNotificationCapability.properties.showSplash
     */
    abstract signalReady(): void;
    /**
     * Closes the notification.
     */
    abstract close(): void;
}

/**
 * Union of workbench elements.
 */
type WorkbenchElement = WorkbenchPart | WorkbenchView | WorkbenchDialog | WorkbenchPopup | WorkbenchNotification;
/**
 * Symbol to inject the workbench element available in the current context.
 *
 * @see WorkbenchElement
 */
declare const WORKBENCH_ELEMENT: unique symbol;

/**
 * Excludes all keys from T, resulting in an empty object `{}`.
 */
type Empty<T> = {
    [Key in keyof T]: never;
};

/**
 * Controls the appearance and behavior of a dialog.
 *
 * @category Dialog
 */
interface WorkbenchDialogOptions {
    /**
     * Passes data to the dialog.
     *
     * The dialog can declare mandatory and optional parameters. No additional parameters are allowed. Refer to the documentation of the capability for more information.
     */
    params?: Map<string, unknown> | {
        [param: string]: unknown;
    };
    /**
     * Controls which area of the application to block by the dialog. Defaults to `context`.
     *
     * One of:
     * - 'none': Non-blocking dialog.
     * - `context`: Blocks a specific part of the application, as specified in {@link context}, defaulting to the calling context.
     * - `application`: Blocks the workbench or browser viewport, based on global workbench settings.
     * - `view`: Deprecated. Same as `context`. Marked for removal.
     */
    modality?: 'none' | 'context' | 'application' | ViewModality$3;
    /**
     * Binds the dialog to a context (e.g., part or view). Defaults to the calling context.
     *
     * The dialog is displayed only if the context is visible and closes when the context is disposed.
     * The dialog is opened in the center of its context, if any, unless opened from the peripheral area.
     *
     * Set to `null` to open the dialog outside a context.
     */
    context?: ViewId | PartId | DialogId | PopupId | NotificationId | Context$5 | null;
    /**
     * Controls whether to animate the opening of the dialog. Defaults is `false`.
     */
    animate?: boolean;
    /**
     * Specifies CSS class(es) to add to the dialog, e.g., to locate the dialog in tests.
     */
    cssClass?: string | string[];
}
/**
 * @deprecated since version 1.0.0-beta.34. Renamed to `context`. Marked for removal.
 */
type ViewModality$3 = 'view';
/**
 * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.
 */
interface Context$5 {
    /**
     * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.
     */
    viewId?: ViewId | null;
}

/**
 * Displays a microfrontend in a dialog.
 *
 * A dialog is a visual element for focused interaction with the user, such as prompting the user for input or confirming actions.
 * The user can move and resize a dialog.
 *
 * A microfrontend provided as a `dialog` capability can be opened in a dialog. The qualifier differentiates between different
 * dialog capabilities. Declaring an intention allows for opening public dialog capabilities of other applications.
 *
 * Displayed on top of other content, a modal dialog blocks interaction with other parts of the application.
 *
 * ## Modality
 * A dialog can be context-modal or application-modal. Context-modal blocks a specific part of the application, as specified by the context;
 * application-modal blocks the workbench or browser viewport, based on global workbench settings.
 *
 * ## Context
 * A dialog can be bound to a context (e.g., part or view), defaulting to the calling context.
 * The dialog is displayed only if the context is visible and closes when the context is disposed.
 *
 * ## Positioning
 * A dialog is opened in the center of its context, if any, unless opened from the peripheral area.
 *
 * ## Stacking
 * Dialogs are stacked per modality, with only the topmost dialog in each stack being interactive.
 *
 * @category Dialog
 * @see WorkbenchDialogCapability
 */
declare abstract class WorkbenchDialogService {
    /**
     * Opens the microfrontend of a `dialog` capability in a workbench dialog based on the given qualifier and options.
     *
     * By default, the dialog is modal to the calling context. Specify a different modality in {@link WorkbenchDialogOptions.modality}.
     *
     * @param qualifier - Identifies the dialog capability that provides the microfrontend to open in a dialog.
     * @param options - Controls the appearance and behavior of the dialog.
     * @returns Promise that resolves to the dialog result, if any, or that rejects if the dialog was closed with an error or couldn't be opened,
     *          e.g., because of missing the intention or because no `dialog` capability was found matching the qualifier and is visible to the application.
     *
     * @see WorkbenchDialogCapability
     * @see WorkbenchDialog
     */
    abstract open<R>(qualifier: Qualifier, options?: WorkbenchDialogOptions): Promise<R | undefined>;
}

/**
 * @ignore
 * @docs-private Not public API. For internal use only.
 */
declare class ɵWorkbenchDialogService implements WorkbenchDialogService {
    private _context?;
    constructor(_context?: ViewId | PartId | DialogId | PopupId | NotificationId | undefined);
    /** @inheritDoc */
    open<R>(qualifier: Qualifier, options?: WorkbenchDialogOptions): Promise<R | undefined>;
}

/**
 * Context when displaying a microfrontend in a dialog.
 *
 * This object can be obtained from the {@link ContextService} using the name {@link ɵDIALOG_CONTEXT}.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
interface ɵDialogContext {
    dialogId: DialogId;
    capability: WorkbenchDialogCapability;
    params: Map<string, unknown>;
}
/**
 * Key for obtaining the current dialog context using {@link ContextService}.
 *
 * The dialog context is only available to microfrontends loaded in a workbench dialog.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 * @see {@link ContextService}
 * @see {@link ɵDialogContext}
 */
declare const ɵDIALOG_CONTEXT = "\u0275workbench.dialog";

/**
 * Message headers to interact with the workbench dialog.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
declare enum ɵWorkbenchDialogMessageHeaders {
    CLOSE_WITH_ERROR = "\u0275WORKBENCH-DIALOG:CLOSE_WITH_ERROR"
}

/**
 * Command to open a dialog.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
interface ɵWorkbenchDialogCommand {
    modality?: 'none' | 'context' | 'application' | ViewModality$2;
    animate?: boolean;
    cssClass?: string | string[];
    context?: ViewId | PartId | DialogId | PopupId | NotificationId | Context$4 | null;
}
/**
 * @deprecated since version 1.0.0-beta.34. Renamed to `context`. Marked for removal.
 */
type ViewModality$2 = 'view';
/**
 * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.
 */
interface Context$4 {
    /**
     * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.
     */
    viewId?: ViewId | null;
}

/**
 * Represents a microfrontend for display in a workbench message box.
 *
 * A message box is a standardized dialog for presenting a message to the user, such as an info, warning or alert,
 * or for prompting the user for confirmation.
 *
 * Displayed on top of other content, a modal message box blocks interaction with other parts of the application. A message box can be context-modal
 * or application-modal. Message boxes are stacked per modality, with only the topmost message box in each stack being interactive.
 *
 * The microfrontend can inject the `WorkbenchMessageBox` handle (and `ActivatedMicrofrontend` if a host microfrontend) to interact with the message box or access parameters.
 *
 * @category MessageBox
 * @see WorkbenchMessageBox
 * @see WorkbenchMessageBoxService
 */
interface WorkbenchMessageBoxCapability extends Capability {
    /**
     * @inheritDoc
     */
    type: WorkbenchCapabilities.MessageBox;
    /**
     * Qualifies the message box. The qualifier is required for a message box.
     *
     * @inheritDoc
     */
    qualifier: Qualifier;
    /**
     * Specifies parameters required by the message box.
     *
     * Parameters can be:
     * - read in the microfrontend by injecting the {@link WorkbenchMessageBox} handle (or `ActivatedMicrofrontend` if a host microfrontend)
     * - referenced in the path using the colon syntax
     *
     * @inheritDoc
     */
    params?: ParamDefinition[];
    /**
     * @inheritDoc
     */
    properties: {
        /**
         * Specifies the path to the microfrontend.
         *
         * The path is relative to the base URL given in the application manifest, or to the origin of the manifest file if no base URL is specified.
         *
         * Path segments can reference capability parameters using the colon syntax.
         *
         * ```json
         * {
         *   "params": [
         *     {"name": "id", "required": true}
         *   ],
         *   "properties": {
         *     "path": "products/:id", // `:id` references a capability parameter
         *   }
         * }
         * ```
         *
         * ### Empty Path Required if Host Capability
         * Messagebox capabilities of the host application require an empty path. In the route, use `canMatchWorkbenchMessageBoxCapability` guard to match the messagebox capability.
         *
         * @example - Route matching a messagebox capability with qualifier {messagebox: 'alert'}
         * ```ts
         * import {Routes} from '@angular/router';
         * import {canMatchWorkbenchMessageBoxCapability} from '@scion/workbench';
         *
         * const routes: Routes = [
         *   {path: '', canMatch: [canMatchWorkbenchMessageBoxCapability({messagebox: 'alert'})], component: AlertComponent},
         * ];
         * ```
         */
        path: string;
        /**
         * Specifies the size of the message box.
         *
         * For the message box to adapt to the size of the microfrontend content, set the size to `auto` and report the microfrontend's preferred size using
         * `PreferredSizeService` in the microfrontend.
         *
         * @example - Reporting the preferred size in the microfrontend
         * ```ts
         * import {Beans} from '@scion/toolkit/bean-manager';
         * import {PreferredSizeService} from '@scion/microfrontend-platform';
         *
         * Beans.get(PreferredSizeService).fromDimension(<Microfrontend HTMLElement>);
         * ``
         */
        size?: WorkbenchMessageBoxSize;
        /**
         * Instructs the workbench to show a splash, such as a skeleton or loading indicator, until the message box microfrontend signals readiness.
         *
         * By default, the workbench shows a loading indicator. A custom splash can be configured in the workbench host application.
         *
         * This property is not supported if a host microfrontend.
         *
         * @see WorkbenchMessageBox.signalReady
         */
        showSplash?: boolean;
        /**
         * Specifies CSS class(es) to add to the message box, e.g., to locate the message box in tests.
         */
        cssClass?: string | string[];
        /**
         * Arbitrary metadata associated with the capability.
         */
        [key: string]: unknown;
    };
}
/**
 * Specifies the message box size.
 */
interface WorkbenchMessageBoxSize {
    /**
     * Specifies the height of the message box, recommended if the message box is provided by an application other than the workbench host application.
     */
    height?: string | 'auto';
    /**
     * Specifies the width of the message box, recommended if the message box is provided by an application other than the workbench host application.
     */
    width?: string | 'auto';
    /**
     * Specifies the min-height of the message box.
     */
    minHeight?: string;
    /**
     * Specifies the max-height of the message box.
     */
    maxHeight?: string;
    /**
     * Specifies the min-width of the message box.
     */
    minWidth?: string;
    /**
     * Specifies the max-width of the message box.
     */
    maxWidth?: string;
}

/**
 * Controls the appearance and behavior of a message box.
 *
 * @category MessageBox
 */
interface WorkbenchMessageBoxOptions {
    /**
     * Specifies the title of the message box.
     *
     * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
     */
    title?: Translatable;
    /**
     * Defines buttons of the message box. If not set, an OK button is displayed by default.
     *
     * Each property in the object literal represents a button, with the property value used as the button label.
     * The label can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
     *
     * Clicking a button closes the message box and returns the property key to the message box opener.
     *
     * A button with the key 'cancel' is also assigned the Escape keystroke.
     *
     * **Example:**
     * ```ts
     * {
     *   yes: 'Yes',
     *   no: 'No',
     *   cancel: 'Cancel',
     * }
     * ```
     */
    actions?: {
        [key: string]: Translatable;
    };
    /**
     * Specifies the severity of the message. Defaults to `info`.
     */
    severity?: 'info' | 'warn' | 'error';
    /**
     * Controls which area of the application to block by the message box. Defaults to `context`.
     *
     * One of:
     * - 'none': Non-blocking message box.
     * - `context`: Blocks a specific part of the application, as specified in {@link context}, defaulting to the calling context.
     * - `application`: Blocks the workbench or browser viewport, based on global workbench settings.
     * - `view`: Deprecated. Same as `context`. Marked for removal.
     */
    modality?: 'none' | 'context' | 'application' | ViewModality$1;
    /**
     * Binds the message box to a context (e.g., part or view). Defaults to the calling context.
     *
     * The message box is displayed only if the context is visible and closes when the context is disposed.
     * The message box is opened in the center of its context, if any, unless opened from the peripheral area.
     *
     * Set to `null` to open the message box outside a context.
     */
    context?: ViewId | PartId | DialogId | PopupId | NotificationId | Context$3 | null;
    /**
     * Specifies if the user can select text displayed in the message box. Defaults to `false`.
     */
    contentSelectable?: boolean;
    /**
     * Passes data to the message box.
     *
     * The message box can declare mandatory and optional parameters. No additional parameters are allowed. Refer to the documentation of the capability for more information.
     */
    params?: Map<string, unknown> | {
        [param: string]: unknown;
    };
    /**
     * Specifies CSS class(es) to add to the message box, e.g., to locate the message box in tests.
     */
    cssClass?: string | string[];
}
/**
 * @deprecated since version 1.0.0-beta.34. Renamed to `context`. Marked for removal.
 */
type ViewModality$1 = 'view';
/**
 * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.
 */
interface Context$3 {
    /**
     * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.
     */
    viewId?: ViewId | null;
}

/**
 * Displays a microfrontend in a message box.
 *
 * A message box is a standardized dialog for presenting a message to the user, such as an info, warning or alert,
 * or for prompting the user for confirmation.
 *
 * A microfrontend provided as a `messagebox` capability can be opened in a message box. The qualifier differentiates between different
 * message box capabilities. Declaring an intention allows for opening public message box capabilities of other applications.
 *
 * Displayed on top of other content, a modal message box blocks interaction with other parts of the application.
 *
 * ## Modality
 * A message box can be context-modal or application-modal. Context-modal blocks a specific part of the application, as specified by the context;
 * application-modal blocks the workbench or browser viewport, based on global workbench settings.
 *
 * ## Context
 * A message box can be bound to a context (e.g., part or view), defaulting to the calling context.
 * The message box is displayed only if the context is visible and closes when the context is disposed.
 *
 * ## Positioning
 * A message box is opened in the center of its context, if any, unless opened from the peripheral area.
 *
 * ## Stacking
 * Message boxes are stacked per modality, with only the topmost message box in each stack being interactive.
 *
 * @category MessageBox
 * @see WorkbenchMessageBoxCapability
 */
declare abstract class WorkbenchMessageBoxService {
    /**
     * Displays the specified message in a message box.
     *
     * By default, the message box is modal to the calling context. Specify a different modality in {@link WorkbenchMessageBoxOptions.modality}.
     *
     * This method requires the intention `{"type": "messagebox"}`.
     *
     * @param message - Specifies the text to display, if any.
     *                  Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
     * @param options - Controls the appearance and behavior of the message box.
     * @returns Promise that resolves to the key of the action button that the user clicked to close the message box,
     *          or that rejects if the message box couldn't be opened, e.g., because of missing the intention.
     */
    abstract open(message: Translatable | null, options?: WorkbenchMessageBoxOptions): Promise<string>;
    /**
     * Opens the microfrontend of a `messagebox` capability in a workbench message box based on the given qualifier and options.
     *
     * By default, the message box is modal to the calling context. Specify a different modality in {@link WorkbenchMessageBoxOptions.modality}.
     *
     * @param qualifier - Identifies the `messagebox` capability that provides the microfrontend to open in a message box.
     * @param options - Controls the appearance and behavior of the message box.
     * @returns Promise that resolves to the key of the action button that the user clicked to close the message box,
     *          or that rejects if the message box couldn't be opened, e.g., because of missing the intention or because no `messagebox`
     *          capability was found matching the qualifier and is visible to the application.
     *
     * @see WorkbenchMessageBoxCapability
     * @see WorkbenchMessageBox
     */
    abstract open(qualifier: Qualifier, options?: WorkbenchMessageBoxOptions): Promise<string>;
}

/**
 * @ignore
 * @docs-private Not public API. For internal use only.
 */
declare class ɵWorkbenchMessageBoxService implements WorkbenchMessageBoxService {
    private _context?;
    constructor(_context?: ViewId | PartId | DialogId | PopupId | NotificationId | undefined);
    /** @inheritDoc */
    open(message: Translatable | null | Qualifier, options?: WorkbenchMessageBoxOptions): Promise<string>;
}

/**
 * Handle to interact with a message box opened via {@link WorkbenchMessageBoxService}.
 *
 * The message box microfrontend can inject this handle to interact with the message box,
 * such as reading parameters or signaling readiness.
 *
 * @category MessageBox
 * @see WorkbenchMessageBoxCapability
 * @see WorkbenchMessageBoxService
 */
declare abstract class WorkbenchMessageBox {
    /**
     * Identity of this message box.
     */
    abstract readonly id: DialogId;
    /**
     * Capability of the microfrontend loaded into this message box.
     */
    abstract readonly capability: WorkbenchMessageBoxCapability;
    /**
     * Parameters as passed by the message box opener.
     */
    abstract readonly params: Map<string, unknown>;
    /**
     * Provides information about where the message box was opened.
     */
    abstract readonly referrer: {
        /**
         * Symbolic name of the application that opened the messagebox.
         */
        readonly appSymbolicName: string;
    };
    /**
     * Indicates whether this message box has the focus.
     */
    abstract readonly focused$: Observable<boolean>;
    /**
     * Signals readiness, notifying the workbench that this message box has completed initialization.
     *
     * If `showSplash` is set to `true` on the `messagebox` capability, the workbench displays a splash until the message box microfrontend signals readiness.
     *
     * @see WorkbenchMessageBoxCapability.properties.showSplash
     */
    abstract signalReady(): void;
}

/**
 * Information about the message box embedding a microfrontend.
 *
 * This object can be obtained from the {@link ContextService} using the name {@link ɵMESSAGE_BOX_CONTEXT}.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
interface ɵMessageBoxContext {
    dialogId: DialogId;
    capability: WorkbenchMessageBoxCapability;
    params: Map<string, unknown>;
    /**
     * Provides information about where the message box was opened.
     */
    referrer: {
        /**
         * Symbolic name of the application that opened the messagebox.
         */
        appSymbolicName: string;
    };
}
/**
 * Key for obtaining the current message box context using {@link ContextService}.
 *
 * The message box context is only available to microfrontends loaded in a workbench message box.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 * @see {@link ContextService}
 * @see {@link ɵMessageBoxContext}
 */
declare const ɵMESSAGE_BOX_CONTEXT = "\u0275workbench.message-box";

/**
 * Command to open a message box.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
interface ɵWorkbenchMessageBoxCommand {
    title?: Translatable;
    actions?: {
        [key: string]: Translatable;
    };
    severity?: 'info' | 'warn' | 'error';
    modality?: 'none' | 'context' | 'application' | ViewModality;
    contentSelectable?: boolean;
    cssClass?: string | string[];
    context?: ViewId | PartId | DialogId | PopupId | NotificationId | Context$2 | null;
}
/**
 * @deprecated since version 1.0.0-beta.34. Renamed to `context`. Marked for removal.
 */
type ViewModality = 'view';
/**
 * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.
 */
interface Context$2 {
    /**
     * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.
     */
    viewId?: ViewId | null;
}
/**
 * Parameter name for the message displayed in the built-in text {@link WorkbenchMessageBoxCapability}.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
declare const eMESSAGE_BOX_MESSAGE_PARAM = "message";

/**
 * Configures the content and appearance of a notification presented to the user.
 *
 * A notification is a closable message that appears in the upper-right corner and disappears automatically after a few seconds.
 * It informs the user of a system event, e.g., that a task has been completed or an error has occurred.
 *
 * Multiple notifications are stacked vertically. Notifications can be grouped. For each group, only the last notification is
 * displayed at any given time.
 *
 * @category Notification
 * @deprecated since version 1.0.0-beta.36. Replaced by `WorkbenchNotificationOptions`. Marked for removal.
 */
interface WorkbenchNotificationConfig {
    /**
     * Specifies the title of the notification.
     *
     * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
     */
    title?: Translatable;
    /**
     * Specifies the content to be displayed in the notification.
     *
     * The content may differ per notification provider, as determined by the qualifier. For example, the built-in notification expects a
     * text message in form of a {@link Translatable}. Refer to the documentation of the notification capability provider for more information.
     */
    content?: Translatable | unknown;
    /**
     * Passes data to the notification.
     *
     * The notification can declare mandatory and optional parameters. No additional parameters are allowed. Refer to the documentation of the capability for more information.
     */
    params?: Map<string, unknown> | {
        [param: string]: unknown;
    };
    /**
     * Specifies the severity of the notification. Defaults to `info`.
     */
    severity?: 'info' | 'warn' | 'error';
    /**
     * Specifies the timeout after which to close the notification automatically. Defaults to `medium`.
     * Can be either a duration alias, or a number in seconds.
     */
    duration?: 'short' | 'medium' | 'long' | 'infinite' | number;
    /**
     * Specifies the group which this notification belongs to.
     * If specified, the notification will replace any previously displayed notification of the same group.
     */
    group?: string;
    /**
     * Specifies CSS class(es) to add to the notification, e.g., to locate the notification in tests.
     */
    cssClass?: string | string[];
}

/**
 * Controls the appearance and behavior of a notification.
 *
 * @category Notification
 */
interface WorkbenchNotificationOptions {
    /**
     * Specifies the title of the notification.
     *
     * Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
     */
    title?: Translatable;
    /**
     * Passes data to the notification.
     *
     * The notification can declare mandatory and optional parameters. No additional parameters are allowed. Refer to the documentation of the capability for more information.
     */
    params?: Map<string, unknown> | {
        [param: string]: unknown;
    };
    /**
     * Specifies the severity of the notification. Defaults to `info`.
     */
    severity?: 'info' | 'warn' | 'error';
    /**
     * Controls how long to display the notification.
     *
     * Can be a duration alias, or milliseconds.
     */
    duration?: 'short' | 'medium' | 'long' | 'infinite' | number;
    /**
     * Specifies the group to which the notification belongs. Only the most recent notification within a group is displayed.
     */
    group?: string;
    /**
     * Specifies CSS class(es) to add to the notification, e.g., to locate the notification in tests.
     */
    cssClass?: string | string[];
}

/**
 * Shows a notification.
 *
 * A notification is a closable message displayed in the upper-right corner that disappears after a few seconds unless hovered or focused.
 * It informs about system events, task completion, or errors. Severity indicates importance or urgency.
 *
 * Notifications can be grouped. Only the most recent notification within a group is displayed.
 *
 * A microfrontend provided as a `notification` capability can be opened in a notification. The qualifier differentiates between different
 * notification capabilities. Declaring an intention allows for opening public notification capabilities of other applications.
 *
 * @see WorkbenchNotificationCapability
 * @category Notification
 */
declare abstract class WorkbenchNotificationService {
    /**
     * Displays the specified message as workbench notification.
     *
     * This method requires the intention `{"type": "notification"}`.
     *
     * @param message - Specifies the text to display, if any.
     *                  Can be text or a translation key. A translation key starts with the percent symbol (`%`) and may include parameters in matrix notation for text interpolation.
     * @param options - Controls the appearance and behavior of the notification.
     * @returns Promise that resolves when the notification is displayed, or that rejects otherwise, e.g., because of missing the intention.
     */
    abstract show(message: Translatable | null, options?: WorkbenchNotificationOptions): Promise<void>;
    /**
     * Displays the microfrontend of a `notification` capability as workbench notification based on the given qualifier and options.
     *
     * @param qualifier - Identifies the `notification` capability that provides the microfrontend to show as workbench notification.
     * @param options - Controls the appearance and behavior of the notification.
     * @returns Promise that resolves when the notification is displayed, or that rejects otherwise, e.g., because of missing the intention
     *          or because no `notification` capability was found matching the qualifier and is visible to the application.
     *
     * @see WorkbenchMessageBoxCapability
     * @see WorkbenchMessageBox
     */
    abstract show(qualifier: Qualifier, options?: WorkbenchNotificationOptions): Promise<void>;
    /**
     * Displays the specified message as workbench notification.
     *
     * @param notification - Configures content and appearance of the notification.
     * @param qualifier - Identifies the `notification` capability that provides the microfrontend to show as workbench notification.
     * @returns Promise that resolves when the notification is displayed or that rejects if the intention is missing or no matching `notification` capability is found.
     *
     * @deprecated since version 1.0.0-beta.36. Pass text or qualifier as first argument. Marked for removal.
     */
    abstract show(notification: WorkbenchNotificationConfig, qualifier?: Qualifier): Promise<void>;
}

/**
 * @ignore
 * @docs-private Not public API. For internal use only.
 */
declare class ɵWorkbenchNotificationService implements WorkbenchNotificationService {
    /** @inheritDoc */
    show(message: Translatable, options?: WorkbenchNotificationOptions): Promise<void>;
    show(qualifier: Qualifier, options?: WorkbenchNotificationOptions): Promise<void>;
    show(notification: WorkbenchNotificationConfig, qualifier?: Qualifier): Promise<void>;
    private showNotification;
    private showNotificationLegacy;
}

/**
 * Command to show a notification.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
interface ɵWorkbenchNotificationCommand {
    title?: Translatable;
    severity?: 'info' | 'warn' | 'error';
    duration?: 'short' | 'medium' | 'long' | 'infinite' | number;
    group?: string;
    cssClass?: string | string[];
}
/**
 * Parameter name for the message displayed in the built-in text {@link WorkbenchNotificationCapability}.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
declare const eNOTIFICATION_MESSAGE_PARAM = "message";

/**
 * Information about the notification embedding a microfrontend.
 *
 * This object can be obtained from the {@link ContextService} using the name {@link ɵNOTIFICATION_CONTEXT}.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
interface ɵNotificationContext {
    notificationId: NotificationId;
    capability: WorkbenchNotificationCapability;
    params: Map<string, unknown>;
    /**
     * Provides information about where the notification was opened.
     */
    referrer: {
        /**
         * Symbolic name of the application that opened the notification.
         */
        appSymbolicName: string;
    };
}
/**
 * Key for obtaining the current notification context using {@link ContextService}.
 *
 * The notification context is only available to microfrontends loaded in a workbench notification.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 * @see {@link ContextService}
 * @see {@link ɵNotificationContext}
 */
declare const ɵNOTIFICATION_CONTEXT = "\u0275workbench.notification";

/**
 * Defines a perspective in the SCION Workbench.
 *
 * A perspective defines an arrangement of parts and views. Parts can be docked to the side or positioned relative to each other.
 * Views are stacked in parts. Content can be displayed in both parts and views.
 *
 * Users can personalize the layout of a perspective and switch between perspectives. The workbench remembers the layout of a perspective,
 * restoring it the next time it is activated.
 *
 * A typical perspective has a main area part and parts docked to the side, providing navigation and context-sensitive assistance to support
 * the user's workflow. The main area part is where the workbench opens views by default and is shared between perspectives. Its layout is
 * not reset when resetting perspectives.
 *
 * Each part must be assigned a unique ID. The ID is used to align parts relative to each other, open views in a specific part, and, if `main-area`,
 * mark the part as the main area part.
 *
 * A part references a part capability that specifies its content, either a microfrontend, a stack of views, or both. If both, the microfrontend
 * is displayed only if the view stack is empty. Views in a docked part cannot be dragged into or out of docked parts.
 *
 * Declaring an intention allows for referencing public part capabilities of other applications. If a part capability cannot be resolved, the part
 * is omitted, allowing conditional display, for example, based on user permissions.
 *
 * @example - Main area with two docked parts
 * ```json
 * {
 *   "type": "perspective",
 *   "qualifier": {
 *     "perspective": "sample-perspective"
 *   },
 *   "properties": {
 *     "parts": [
 *       {
 *         "id": "main-area",
 *         "qualifier": {"part": "main-area"}
 *       },
 *       {
 *         "id": "navigator",
 *         "qualifier": {"part": "navigator"},
 *         "position": "left-top"
 *       },
 *       {
 *         "id": "find",
 *         "qualifier": {"part": "find"},
 *         "position": "bottom-left",
 *       }
 *     ]
 *   }
 * }
 * ```
 *
 * Layout of above definition:
 *
 * ```plain
 * +-+------------+-----------------+
 * |x| navigator  |    main-area    |
 * | | (left-top) |                 |
 * | |            |                 |
 * | |            |                 |
 * | |------------+-----------------|
 * |x| find (bottom-left)           |
 * +-+------------------------------+
 * ```
 *
 * @example - Main area with a part aligned relative to a docked part
 *
 * ```json
 * {
 *   "type": "perspective",
 *   "qualifier": {
 *     "perspective": "sample-perspective"
 *   },
 *   "properties": {
 *     "parts": [
 *       {
 *         "id": "main-area",
 *         "qualifier": {"part": "main-area"}
 *       },
 *       {
 *         "id": "navigator",
 *         "qualifier": {"part": "navigator"},
 *         "position": "left-top"
 *       },
 *       {
 *         "id": "detail",
 *         "qualifier": {"part": "detail"},
 *         "position": {"align": "bottom", "relativeTo": "navigator"}
 *       }
 *     ]
 *   }
 * }
 * ```
 *
 * Layout of above definition:
 *
 * ```plain
 * +-+------------+-----------------+
 * |x| navigator  |    main-area    |
 * | | (left-top) |                 |
 * | |            |                 |
 * | |------------+                 |
 * | | detail     |                 |
 * | | (bottom of |                 |
 * | | navigator) |                 |
 * +-+------------+-----------------+
 * ```
 *
 * @example - Main area with parts aligned relative to the main area
 * ```json
 * {
 *   "type": "perspective",
 *   "qualifier": {
 *     "perspective": "sample-perspective"
 *   },
 *   "properties": {
 *     "parts": [
 *       {
 *         "id": "main-area",
 *         "qualifier": {"part": "main-area"}
 *       },
 *       {
 *         "id": "navigator",
 *         "qualifier": {"part": "navigator"},
 *         "position": {"align": "left", "relativeTo": "main-area", "ratio": 0.25}
 *       },
 *       {
 *         "id": "find",
 *         "qualifier": {"part": "find"},
 *         "position": {"align": "bottom", "relativeTo": "main-area"}
 *       }
 *     ]
 *   }
 * }
 * ```
 *
 * Layout of above definition:
 *
 * ```plain
 * +------------+---------------+
 * | navigator  |   main-area   |
 * | (left of   |               |
 * | main-area) |               |
 * |            |               |
 * |            +---------------+
 * |            |     find      |
 * |            |  (bottom of   |
 * |            |  main-area)   |
 * +------------+---------------+
 * ```
 */
interface WorkbenchPerspectiveCapability extends Capability {
    /**
     * @inheritDoc
     */
    type: WorkbenchCapabilities.Perspective;
    /**
     * Qualifies this perspective. The qualifier is required for a perspective.
     *
     * @inheritDoc
     */
    qualifier: Qualifier;
    /**
     * @inheritDoc
     */
    properties: {
        /**
         * Defines the arrangement of parts.
         *
         * Parts can be docked to the side or positioned relative to each other.
         *
         * The first part cannot be positioned and is typically the main area part. The main area part
         * is a special part with `main-area` as its id. The main area is where the workbench opens views
         * by default. It is shared between perspectives and its layout is not reset when resetting perspectives.
         */
        parts: [
            Omit<WorkbenchPartRef, 'position'>,
            ...WorkbenchPartRef[]
        ];
        /**
         * Associates arbitrary data with the perspective, e.g., a label, icon or tooltip.
         *
         * The workbench host application can read associated data plus metadata about the perspective from {@link WorkbenchPerspective.data}.
         * See {@link WorkbenchPerspectiveData} for metadata set by the SCION Workbench.
         */
        data?: {
            [key: string]: unknown;
        };
    };
}
/**
 * Describes a part referenced in the perspective.
 */
interface WorkbenchPartRef {
    /**
     * Identifies the part. Use {@link MAIN_AREA} for the main area part.
     */
    id: string | MAIN_AREA;
    /**
     * Specifies the {@link WorkbenchPartCapability} that provides the content of the part.
     *
     * Declaring an intention allows for referencing public part capabilities of other applications.
     *
     * If the part capability cannot be resolved, the part is omitted, allowing conditional display, for example, based on user permissions.
     */
    qualifier: Qualifier;
    /**
     * Positions the part, either docked or relative to another part.
     */
    position: DockingArea | RelativeTo;
    /**
     * Defines data to pass to the part.
     *
     * The part can declare mandatory and optional parameters. No additional parameters are allowed. Refer to the documentation of the capability for more information.
     */
    params?: {
        [name: string]: unknown;
    };
    /**
     * Controls whether to activate the part.
     */
    active?: boolean;
    /**
     * Specifies CSS class(es) to add to the part, e.g., to locate the part in tests.
     */
    cssClass?: string | string[];
    /**
     * Internal identifier for a docked part.
     *
     * @docs-private Not public API. For internal use only.
     */
    ɵactivityId?: ActivityId;
}
/**
 * Controls where to dock a part.
 *
 * A part can be docked to the left, right, or bottom side of the workbench. Docked parts can be minimized to create more space for the main content.
 *
 * Each side has two docking areas: `left-top` and `left-bottom`, `right-top` and `right-bottom`, and `bottom-left` and `bottom-right`.
 * Parts added to the same area are stacked, with only one part active per stack. If there is an active part in both stacks of a side,
 * the two parts are split vertically or horizontally, depending on the side.
 *
 * Docking areas:
 * - `left-top`: Dock to the top on the left side.
 * - `left-bottom`: Dock to the bottom on the left side.
 * - `right-top`: Dock to the top on the right side.
 * - `right-bottom`: Dock to the bottom on the right side.
 * - `bottom-left`: Dock to the left on the bottom side.
 * - `bottom-right`: Dock to the right on the bottom side.
 */
type DockingArea = 'left-top' | 'left-bottom' | 'right-top' | 'right-bottom' | 'bottom-left' | 'bottom-right';
/**
 * Describes how to lay out a part relative to another part.
 */
interface RelativeTo {
    /**
     * Specifies the part which to use as the reference part to lay out the part.
     * If not set, the part will be aligned relative to the root of the layout.
     */
    relativeTo?: string;
    /**
     * Specifies the side of the reference part where to add the part.
     */
    align: 'left' | 'right' | 'top' | 'bottom';
    /**
     * Specifies the proportional size of the part relative to the reference part.
     * The ratio is the closed interval [0,1]. If not set, defaults to `0.5`.
     */
    ratio?: number;
}
/**
 * Identifies the main area part.
 *
 * The main area is a special part that can be added to the layout. The main area is where the workbench opens views by default.
 * It is shared between perspectives and its layout is not reset when resetting perspectives.
 */
declare const MAIN_AREA: MAIN_AREA;
/**
 * Represents the type of the {@link MAIN_AREA} constant.
 */
type MAIN_AREA = 'main-area';

/**
 * Command to open a popup.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
interface ɵWorkbenchPopupCommand {
    popupId: PopupId;
    align?: 'east' | 'west' | 'north' | 'south';
    closeStrategy?: {
        onFocusLost?: boolean;
        onEscape?: boolean;
    };
    cssClass?: string | string[];
    context?: ViewId | PartId | DialogId | PopupId | NotificationId | Context$1 | null;
}
/**
 * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.
 */
interface Context$1 {
    /**
     * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.
     */
    viewId?: ViewId | null;
}

/**
 * Represents a point on the page or view, optionally with a dimension, where a workbench popup should be attached.
 *
 * @category Popup
 */
type PopupOrigin = (Point | TopLeftPoint | TopRightPoint | BottomLeftPoint | BottomRightPoint) & {
    width?: number;
    height?: number;
};
/**
 * Coordinate relative to the "x/y" corner of the view or page viewport.
 *
 * @category Popup
 */
interface Point {
    x: number;
    y: number;
}
/**
 * Coordinate relative to the "top/left" corner of the view or page viewport.
 *
 * This is equivalent to passing a "x/y" coordinate as {@link Point}.
 *
 * @category Popup
 */
interface TopLeftPoint {
    top: number;
    left: number;
}
/**
 * Coordinate relative to the "top/right" corner of the view or page viewport.
 *
 * @category Popup
 */
interface TopRightPoint {
    top: number;
    right: number;
}
/**
 * Coordinate relative to the "bottom/left" corner of the view or page viewport.
 *
 * @category Popup
 */
interface BottomLeftPoint {
    bottom: number;
    left: number;
}
/**
 * Coordinate relative to the "bottom/right" corner of the view or page viewport.
 *
 * @category Popup
 */
interface BottomRightPoint {
    bottom: number;
    right: number;
}

/**
 * Controls the appearance and behavior of a popup.
 *
 * @category Popup
 */
interface WorkbenchPopupOptions {
    /**
     * Controls where to open the popup.
     *
     * Can be an HTML element or a coordinate. The coordinate is relative to the {@link context}, defaulting to the calling context.
     *
     * Supported coordinate pairs:
     * - x/y: Relative to the top/left corner of the context.
     * - top/left: Same as x/y.
     * - top/right: Relative to the top/right corner of the context.
     * - bottom/left: Relative to the bottom/left corner of the context.
     * - bottom/right: Relative to the bottom/right corner of the context.
     *
     * Passing an Observable allows for updating the coordinate.
     */
    anchor: Element | PopupOrigin | Observable<PopupOrigin>;
    /**
     * Controls where to align the popup relative to the popup anchor, unless there is not enough space available in that area. Defaults to `north`.
     */
    align?: 'east' | 'west' | 'north' | 'south';
    /**
     * Passes data to the popup.
     *
     * The popup can declare mandatory and optional parameters. No additional parameters are allowed. Refer to the documentation of the capability for more information.
     */
    params?: Map<string, unknown> | {
        [param: string]: unknown;
    };
    /**
     * Controls when to close the popup.
     */
    closeStrategy?: CloseStrategy;
    /**
     * Specifies CSS class(es) to add to the popup, e.g., to locate the popup in tests.
     */
    cssClass?: string | string[];
    /**
     * Binds the popup to a context (e.g., part or view). Defaults to the calling context.
     *
     * The popup is displayed only if the context is visible and closes when the context is disposed.
     *
     * Set to `null` to open the popup outside a context.
     */
    context?: ViewId | PartId | DialogId | PopupId | NotificationId | Context | null;
}
/**
 * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.
 */
interface Context {
    /**
     * @deprecated since version 1.0.0-beta.34. Set view id directly. Migrate `{context: {viewId: 'view.x'}}` to `{context: 'view.x'}`. Marked for removal.
     */
    viewId?: ViewId | null;
}
/**
 * Specifies when to close the popup.
 *
 * @category Popup
 */
interface CloseStrategy {
    /**
     * Controls if to close the popup on focus loss, returning the result set via {@link Popup#setResult} to the popup opener.
     * Defaults to `true`.
     */
    onFocusLost?: boolean;
    /**
     * Controls if to close the popup when pressing escape. Defaults to `true`.
     * No return value will be passed to the popup opener.
     */
    onEscape?: boolean;
}

/**
 * Controls the appearance and behavior of a popup.
 *
 * @category Popup
 * @deprecated since version 1.0.0-beta.36. Replaced by `WorkbenchPopupOptions`. Marked for removal.
 */
type WorkbenchPopupConfig = WorkbenchPopupOptions;

/**
 * Displays a microfrontend in a popup.
 *
 * A popup is a visual workbench element for displaying content above other content. It is positioned relative to an anchor,
 * which can be an element or a coordinate. The popup moves with the anchor. By default, the popup closes on focus loss or
 * when pressing the escape key.
 *
 * A microfrontend provided as a `popup` capability can be opened in a popup. The qualifier differentiates between different
 * popup capabilities. Declaring an intention allows for opening public popup capabilities of other applications.
 *
 * A popup can be bound to a context (e.g., part or view), displaying the popup only if the context is visible and closing
 * it when the context is disposed. Defaults to the calling context.
 *
 * @category Popup
 * @see WorkbenchPopupCapability
 */
declare abstract class WorkbenchPopupService {
    /**
     * Opens the microfrontend of a `popup` capability in a workbench popup based on the given qualifier and options.
     *
     * An anchor is used to position the popup based on its preferred alignment. The anchor can be an element or a coordinate.
     *
     * By default, the popup closes on focus loss or when pressing the escape key.
     *
     * @param qualifier - Identifies the popup capability that provides the microfrontend to open in a popup.
     * @param options - Controls the appearance and behavior of the popup.
     * @returns Promise that resolves to the popup result, if any, or that rejects if the popup was closed with an error or couldn't be opened,
     *          e.g., because of missing the intention or because no `popup` capability was found matching the qualifier and is visible to the application.
     */
    abstract open<T>(qualifier: Qualifier, options: WorkbenchPopupOptions | WorkbenchPopupConfig): Promise<T | undefined>;
}

/**
 * @ignore
 * @docs-private Not public API. For internal use only.
 */
declare class ɵWorkbenchPopupService implements WorkbenchPopupService {
    private _context?;
    constructor(_context?: ViewId | PartId | DialogId | PopupId | NotificationId | undefined);
    /** @inheritDoc */
    open<T>(qualifier: Qualifier, options: WorkbenchPopupOptions): Promise<T | undefined>;
    /**
     * Observes the position of the popup anchor.
     *
     * The Observable emits the anchor's initial position, and each time its position changes.
     * The Observable never completes.
     */
    private observePopupOrigin$;
}

/**
 * Context when displaying a microfrontend in a popup.
 *
 * This object can be obtained from the {@link ContextService} using the name {@link ɵPOPUP_CONTEXT}.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
interface ɵPopupContext {
    popupId: PopupId;
    params: Map<string, unknown>;
    capability: WorkbenchPopupCapability;
    /** @deprecated since version 1.0.0-beta.34. No replacement. Marked for removal. */
    referrer: WorkbenchPopupReferrer;
}
/**
 * Key for obtaining the current popup context using {@link ContextService}.
 *
 * The popup context is only available to microfrontends loaded in a workbench popup.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 * @see {@link ContextService}
 * @see {@link ɵPopupContext}
 */
declare const ɵPOPUP_CONTEXT = "\u0275workbench.popup";

/**
 * Message headers to interact with the workbench popup.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
declare enum ɵWorkbenchPopupMessageHeaders {
    CLOSE_WITH_ERROR = "\u0275WORKBENCH-POPUP:CLOSE_WITH_ERROR"
}

/**
 * Enables navigation of workbench views.
 *
 * A view is a visual workbench element for displaying content side-by-side or stacked.
 *
 * A microfrontend provided as a view capability can be opened in a view. The qualifier differentiates between different
 * view capabilities. Declaring an intention allows for opening public view capabilities of other applications.
 *
 * @category Router
 * @category View
 */
declare abstract class WorkbenchRouter {
    /**
     * Navigates to a microfrontend of a view capability based on the given qualifier and extras.
     *
     * By default, the router opens a new view if no view is found that matches the specified qualifier and required params. Optional parameters do not affect view resolution.
     * If one or more views match the qualifier and required params, they will be navigated instead of opening the microfrontend in a new view tab.
     * This behavior can be changed by setting an explicit navigation target in navigation extras.
     *
     * @param  qualifier - Identifies the view capability that provides the microfrontend to display in a view.
     *                     Passing an empty qualifier (`{}`) allows the microfrontend to update its parameters, restoring updated parameters when the page reloads.
     *                     Parameter handling can be controlled using the {@link WorkbenchNavigationExtras#paramsHandling} option.
     * @param  extras - Options to control navigation.
     * @return Promise that resolves to `true` on successful navigation, or `false` otherwise.
     */
    abstract navigate(qualifier: Qualifier | Empty<Qualifier>, extras?: WorkbenchNavigationExtras): Promise<boolean>;
}
/**
 * Options to control the navigation.
 *
 * @category Router
 * @category View
 */
interface WorkbenchNavigationExtras {
    /**
     * Passes data to the view.
     *
     * The view can declare mandatory and optional parameters. No additional parameters are allowed. Refer to the documentation of the capability for more information.
     */
    params?: Map<string, unknown> | {
        [param: string]: unknown;
    };
    /**
     * Instructs the workbench router how to handle params in self-navigation.
     *
     * Self-navigation allows the microfrontend to update its parameters, restoring updated parameters when the page reloads.
     * Setting a `paramsHandling` strategy has no effect on navigations other than self-navigation. A self-navigation is
     * initiated by passing an empty qualifier.
     *
     * One of:
     * * `replace`: Replaces current parameters (default).
     * * `merge`:   Merges new parameters with current parameters, with new parameters of equal name overwriting existing parameters.
     *              A parameter can be removed by passing `undefined` as its value.
     */
    paramsHandling?: 'merge' | 'replace';
    /**
     * Controls where to open the view. Defaults to `auto`.
     *
     * One of:
     * - `auto`:   Navigates existing views that match the qualifier and required params, or opens a new view otherwise. Optional parameters do not affect view resolution.
     * - `blank`:  Opens a new view and navigates it.
     * - `<viewId>`: Navigates the specified view. If already opened, replaces it, or opens a new view otherwise.
     */
    target?: string | 'blank' | 'auto';
    /**
     * Controls which part to navigate views in.
     *
     * If {@link target} is `blank`, opens the view in the specified part.
     * If {@link target} is `auto`, navigates matching views in the specified part, or opens a new view in that part otherwise.
     *
     * If the specified part is not in the layout, opens the view in the active part, with the active part of the main area, if any, taking precedence.
     */
    partId?: PartId | string;
    /**
     * Instructs the router to activate the view. Defaults to `true`.
     */
    activate?: boolean;
    /**
     * Closes views that match the specified qualifier and required parameters. Optional parameters do not affect view resolution.
     *
     * The parameters support the asterisk wildcard value (`*`) to match views with any value for a parameter.
     *
     * Only views for which the application has an intention can be closed.
     */
    close?: boolean;
    /**
     * Specifies where to insert the view into the tab bar. Has no effect if navigating an existing view. Defaults to after the active view.
     */
    position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view';
    /**
     * Specifies CSS class(es) to add to the view, e.g., to locate the view in tests.
     */
    cssClass?: string | string[];
}

/**
 * @ignore
 * @docs-private Not public API. For internal use only.
 */
declare class ɵWorkbenchRouter implements WorkbenchRouter {
    /** @inheritDoc */
    navigate(qualifier: Qualifier | Empty<Qualifier>, extras?: WorkbenchNavigationExtras): Promise<boolean>;
    private navigateView;
    private updateViewParams;
    private isSelfNavigation;
}
/**
 * Command object to navigate a view.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
interface ɵWorkbenchNavigateCommand {
    target?: string | 'blank' | 'auto';
    partId?: PartId | string;
    activate?: boolean;
    close?: boolean;
    position?: number | 'start' | 'end' | 'before-active-view' | 'after-active-view';
    cssClass?: string | string[];
}
/**
 * Command object to update view params in self-navigation.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
interface ɵViewParamsUpdateCommand {
    /**
     * @see WorkbenchNavigationExtras#params
     */
    params: Dictionary;
    /**
     * @see WorkbenchNavigationExtras#paramsHandling
     */
    paramsHandling?: 'merge' | 'replace';
}

/**
 * Provides texts from micro applications.
 *
 * Applications can register a text provider using {@link WorkbenchClient.registerTextProvider} to provide texts to other applications.
 *
 * To get texts from another application, the application must declare an intention:
 *
 * ```json
 * {
 *   "type": "text-provider",
 *   "qualifier": {
 *     "provider": "<APP_SYMBOLIC_NAME>" // Replace with the symbolic name of the providing application
 *   }
 * },
 * ```
 *
 * @category Localization
 */
declare abstract class WorkbenchTextService {
    /**
     * Gets the text for given {@link Translatable} from the specified application. Text requests are cached.
     *
     * A {@link Translatable} is a string that, if starting with the percent symbol (`%`), is passed to the specified application for translation, with the percent symbol omitted.
     * Otherwise, the text is returned as is.
     *
     * Interpolation parameters can either be passed via options or appended to the translatable in matrix notation. If appended to the translatable, semicolons must be escaped with two backslashes (`\\;`).
     *
     * @example - Request the text for given key
     * ```ts
     * Beans.get(WorkbenchTextService).text$('%key', {provider: 'app'});
     * ```
     *
     * @example - Request the text for given key and interpolation parameters
     * ```ts
     * Beans.get(WorkbenchTextService).text$('%key;param1=value1;param2=value2', {provider: 'app'});
     *
     * // Alternatively, parameters can be passed via options.
     * Beans.get(WorkbenchTextService).text$('%key', {params: {param1: 'value1', param2: 'value2'}, provider: 'app'});
     * ```
     *
     * @param translatable - Specifies the translatable.
     * @param options - Options for requesting the text.
     * @param options.provider - Application that provides the text.
     * @param options.params - Parameters for text interpolation.
     * @param options.ttl - Time to retain texts in the cache after the last subscriber unsubscribes, in milliseconds. Defaults to the next animation frame.
     * @return Observable emitting the requested text or `undefined` if not found.
     *         Localized texts are emitted in the current language, and each time when the language changes.
     *         If an error occurs, the observable emits the passed translation key and then completes. The error is not propagated.
     */
    abstract text$(translatable: Translatable | undefined, options: {
        provider: string;
        params?: Record<string, unknown> | Map<string, unknown>;
        ttl?: number;
    }): Observable<string | undefined>;
}

/** @inheritDoc */
declare class ɵWorkbenchTextService implements WorkbenchTextService, PreDestroy {
    private readonly _cache;
    /** @inheritDoc */
    text$(translatable: Translatable | undefined, options: {
        provider: string;
        params?: Record<string, unknown> | Map<string, unknown>;
        ttl?: number;
    }): Observable<string | undefined>;
    preDestroy(): void;
}

/**
 * Enables an application to monitor the workbench theme.
 */
declare abstract class WorkbenchThemeMonitor {
    /**
     * Emits the current workbench theme.
     *
     * Upon subscription, emits the current theme, and then continuously emits when switching the theme. It never completes.
     */
    abstract readonly theme$: Observable<WorkbenchTheme | null>;
}
/**
 * Information about a workbench theme.
 */
interface WorkbenchTheme {
    /**
     * The name of the theme.
     */
    name: string;
    /**
     * The color scheme of the theme.
     */
    colorScheme: 'light' | 'dark';
}

/**
 * Context key to retrieve information about the current workbench theme.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 * @see {@link ContextService}
 */
declare const ɵTHEME_CONTEXT_KEY = "\u0275workbench.theme";

declare class ɵWorkbenchView implements WorkbenchView, PreDestroy {
    id: ViewId;
    private _propertyChange$;
    private _destroy$;
    /**
     * Observable that emits when the application loaded into the current view receives an unloading event,
     * i.e., is just about to be replaced by a microfrontend of another application.
     */
    private _beforeUnload$;
    /**
     * Observable that emits before navigating to a different microfrontend of the same app.
     */
    private _beforeInAppNavigation$;
    private _canCloseFn;
    private _canCloseSubscription;
    active$: Observable<boolean>;
    focused$: Observable<boolean>;
    partId$: Observable<PartId>;
    params$: Observable<Map<string, unknown>>;
    capability$: Observable<WorkbenchViewCapability>;
    whenProperties: Promise<void>;
    snapshot: ViewSnapshot;
    constructor(id: ViewId);
    /** @inheritDoc */
    signalReady(): void;
    /** @inheritDoc */
    setTitle(title: Translatable): void;
    /** @inheritDoc */
    setHeading(heading: Translatable): void;
    /** @inheritDoc */
    markDirty(dirty: undefined | boolean | Observable<boolean>): void;
    /** @inheritDoc */
    setClosable(closable: boolean | Observable<boolean>): void;
    /** @inheritDoc */
    close(): void;
    /** @inheritDoc */
    canClose(canClose: CanCloseFn): CanCloseRef;
    preDestroy(): void;
}
/**
 * Context key for obtaining the view ID using {@link ContextService}.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 * @see {@link ContextService}
 */
declare const ɵVIEW_ID_CONTEXT_KEY = "\u0275workbench.view.id";
/**
 * Parameter name for obtaining the capability id in a microfrontend view.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
declare const ɵVIEW_CAPABILITY_ID_PARAM_NAME = "\u0275ViewCapabilityId";

/**
 * Context when displaying a microfrontend in a part.
 *
 * This object can be obtained from the {@link ContextService} using the name {@link ɵWORKBENCH_PART_CONTEXT}.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 */
interface ɵWorkbenchPartContext {
    partId: PartId;
    capability: WorkbenchPartCapability;
    params: Map<string, unknown>;
}
/**
 * Key for obtaining the current part context using {@link ContextService}.
 *
 * The part context is only available to microfrontends loaded in a workbench part.
 *
 * @docs-private Not public API. For internal use only.
 * @ignore
 * @see {@link ContextService}
 * @see {@link ɵDialogContext}
 */
declare const ɵWORKBENCH_PART_CONTEXT = "\u0275workbench.part";

declare class ɵWorkbenchPart implements WorkbenchPart {
    id: PartId;
    active$: Observable<boolean>;
    focused$: Observable<boolean>;
    params: Map<string, unknown>;
    capability: WorkbenchPartCapability;
    constructor(context: ɵWorkbenchPartContext);
    /** @inheritDoc */
    signalReady(): void;
}

export { MAIN_AREA, WORKBENCH_ELEMENT, WorkbenchCapabilities, WorkbenchClient, WorkbenchDialog, WorkbenchDialogService, WorkbenchMessageBox, WorkbenchMessageBoxService, WorkbenchNotification, WorkbenchNotificationService, WorkbenchPart, WorkbenchPopup, WorkbenchPopupService, WorkbenchRouter, WorkbenchTextService, WorkbenchThemeMonitor, WorkbenchView, eMESSAGE_BOX_MESSAGE_PARAM, eNOTIFICATION_MESSAGE_PARAM, ɵDIALOG_CONTEXT, ɵMESSAGE_BOX_CONTEXT, ɵNOTIFICATION_CONTEXT, ɵPOPUP_CONTEXT, ɵTHEME_CONTEXT_KEY, ɵVIEW_CAPABILITY_ID_PARAM_NAME, ɵVIEW_ID_CONTEXT_KEY, ɵWORKBENCH_PART_CONTEXT, ɵWorkbenchCommands, ɵWorkbenchDialogMessageHeaders, ɵWorkbenchDialogService, ɵWorkbenchMessageBoxService, ɵWorkbenchNotificationService, ɵWorkbenchPart, ɵWorkbenchPopupMessageHeaders, ɵWorkbenchPopupService, ɵWorkbenchRouter, ɵWorkbenchTextService, ɵWorkbenchView };
export type { ActivityId, BottomLeftPoint, BottomRightPoint, CanCloseFn, CanCloseRef, CloseStrategy, DialogId, Disposable, DockedPartExtras, DockingArea, Empty, NotificationId, PartId, Point, PopupId, PopupOrigin, RelativeTo, TopLeftPoint, TopRightPoint, Translatable, ViewId, ViewParamDefinition, ViewSnapshot, WorkbenchDialogCapability, WorkbenchDialogOptions, WorkbenchDialogSize, WorkbenchElement, WorkbenchMessageBoxCapability, WorkbenchMessageBoxOptions, WorkbenchMessageBoxSize, WorkbenchNavigationExtras, WorkbenchNotificationCapability, WorkbenchNotificationConfig, WorkbenchNotificationOptions, WorkbenchNotificationSize, WorkbenchPartCapability, WorkbenchPartRef, WorkbenchPerspectiveCapability, WorkbenchPopupCapability, WorkbenchPopupConfig, WorkbenchPopupOptions, WorkbenchPopupReferrer, WorkbenchPopupSize, WorkbenchTextProviderFn, WorkbenchTheme, WorkbenchViewCapability, WorkbenchViewRef, ɵDialogContext, ɵMessageBoxContext, ɵNotificationContext, ɵPopupContext, ɵViewParamsUpdateCommand, ɵWorkbenchDialogCommand, ɵWorkbenchMessageBoxCommand, ɵWorkbenchNavigateCommand, ɵWorkbenchNotificationCommand, ɵWorkbenchPartContext, ɵWorkbenchPopupCommand };
