/** @packageDocumentation
 * @module UiProvider
 */
import type { MarkRequired } from "@itwin/core-bentley";
import { BeUiEvent } from "@itwin/core-bentley";
import type { BackstageItem } from "../backstage/BackstageItem";
import type { StagePanelLocation } from "../stagepanels/StagePanelLocation";
import type { StagePanelSection } from "../stagepanels/StagePanelSection";
import type { StatusBarItem } from "../statusbar/StatusBarItem";
import type { ToolbarItem } from "../toolbar/ToolbarItem";
import type { ToolbarOrientation, ToolbarUsage } from "../toolbar/ToolbarItem";
import type { Widget } from "../widgets/Widget";
import type { ProviderItem } from "./ProviderItem";
import type { UiItemsProvider } from "./UiItemsProvider";
/** UiItemsProvider register event args.
 * @public
 * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.
 */
export interface UiItemsProviderRegisteredEventArgs {
    providerId: string;
}
/** UiItemsProvider overrides allows the application that registers a provider to limit when it is allowed to provide items
 * @public
 */
export interface AllowedUiItemsProviderOverrides {
    /** allows providerId to be overridden in the items manager for cases where the same provider needs to provide different content to different stages */
    providerId?: string;
    /** if specified then the current stage's Usage will be compared before allowing any items to be provided */
    stageUsages?: string[];
    /** if specified then the current stage's Id will be compared before allowing any items to be provided */
    stageIds?: string[];
}
/** Allowed overrides applied to a UiItemsProvider the application that registers a provider to limit when it is allowed to provide items.
 * Note that if an override `providerId` is specified then either `stageIds` or `stageUsages` must be defined to limit when the provider's
 * items are allowed.
 * @public
 */
export type UiItemsProviderOverrides = MarkRequired<AllowedUiItemsProviderOverrides, "providerId" | "stageUsages"> | MarkRequired<AllowedUiItemsProviderOverrides, "providerId" | "stageIds"> | MarkRequired<AllowedUiItemsProviderOverrides, "stageIds"> | MarkRequired<AllowedUiItemsProviderOverrides, "stageUsages"> | MarkRequired<AllowedUiItemsProviderOverrides, "providerId" | "stageUsages" | "stageIds">;
/** Controls registering of UiItemsProviders and calls the provider's methods when populating different parts of the User Interface.
 * @public
 */
export declare class UiItemsManager {
    private static _registeredUiItemsProviders;
    private static _onUiProviderRegisteredEvent;
    private static _abstractAdapter;
    /** For use in unit testing
     * @internal
     */
    static useAbstractAdapter(useAbstractAdapter: boolean): void;
    /** For use in unit testing
     * @internal */
    static clearAllProviders(): void;
    /** Event raised any time a UiProvider is registered or unregistered. */
    static get onUiProviderRegisteredEvent(): BeUiEvent<UiItemsProviderRegisteredEventArgs>;
    /** Return number of registered UiProvider. */
    static get registeredProviderIds(): string[];
    /** Return true if there is any registered UiProvider. */
    static get hasRegisteredProviders(): boolean;
    /**
     * Retrieves a previously loaded UiItemsProvider.
     * @param providerId id of the UiItemsProvider to get
     */
    static getUiItemsProvider(providerId: string): UiItemsProvider | undefined;
    private static sendRegisteredEvent;
    /**
     * Registers a UiItemsProvider with the UiItemsManager.
     * @param uiProvider the UI items provider to register.
     * @param overrides the UI items provider to register.
     */
    static register(uiProvider: UiItemsProvider, overrides?: UiItemsProviderOverrides): void;
    /** Remove a specific UiItemsProvider from the list of available providers. */
    static unregister(providerId: string): void;
    private static allowItemsFromProvider;
    /** Called when the application is populating a toolbar so that any registered UiItemsProvider can add tool buttons that either either execute
     * an action or specify a registered ToolId into toolbar.
     * @param stageId a string identifier of the active stage.
     * @param stageUsage the StageUsage of the active stage.
     * @param usage usage of the toolbar
     * @param orientation orientation of the toolbar
     * @returns an array of error messages. The array will be empty if the load is successful, otherwise it is a list of one or more problems.
     */
    static getToolbarButtonItems(stageId: string, stageUsage: string, usage: ToolbarUsage, orientation: ToolbarOrientation): ReadonlyArray<ProviderItem<ToolbarItem>>;
    /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields
     * @param stageId a string identifier of the active stage.
     * @param stageUsage the StageUsage of the active stage.
     * @returns An array of CommonStatusBarItem that will be used to create controls for the status bar.
     */
    static getStatusBarItems(stageId: string, stageUsage: string): ReadonlyArray<ProviderItem<StatusBarItem>>;
    /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields
     * @returns An array of BackstageItem that will be used to create controls for the backstage menu.
     */
    static getBackstageItems(): ReadonlyArray<ProviderItem<BackstageItem>>;
    /** Called when the application is populating the Stage Panels so that any registered UiItemsProvider can add widgets
     * @param stageId a string identifier of the active stage.
     * @param stageUsage the StageUsage of the active stage.
     * @param location the location within the stage.
     * @param section the section within location.
     * @returns An array of widgets.
     */
    static getWidgets(stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection): ReadonlyArray<ProviderItem<Widget>>;
}
//# sourceMappingURL=UiItemsManager.d.ts.map