/// <reference types="clientapp/app/widgetruntime/orchestrator/widgetapimodule" />
import { WidgetComponentConfig, WidgetLifecycleEvent } from "../apis/api.interfaces";
import { IWidgetRegistrar } from "../registrar/registrar.interfaces";
import { WidgetInstanceElement } from "../widgetInstanceElement/widget-instance";
import { IWidgetInstanceManager } from "../widgetInstanceManager/widgetInstanceManager.interfaces";
import { IWidgetInstanceInternal } from "./IWidgetInstanceInternal";
import { IWidgetOrchestrator } from "./IWidgetOrchestrator";
import { IWidgetRegistration } from "./IWidgetRegistration";
import { IWidgetValidator } from "./IWidgetValidator";
import { EntryPoint, OrchestratorEvent } from "./orchestrator.types";
declare global {
    interface Window {
        Owa?: {
            calendarwidget?: {
                defineWidget?: (config: WidgetComponentConfig) => void;
            };
            todowidget?: {
                defineWidget?: (config: WidgetComponentConfig) => void;
            };
        };
    }
}
export declare class WidgetFiltering implements IWidgetValidator {
    isRegistrationValid(widgetRegistration: IWidgetRegistration, geoName: string, accountType: string, anyMSAAvailable: boolean | undefined, anyAADAvailable: boolean | undefined, isUserSignedOut: boolean | undefined): boolean;
    isRegistrationValidForRegion(registration: IWidgetRegistration, region: string): boolean;
    isRegistrationValidForAccountType(registration: IWidgetRegistration, accountType: string, anyMSAAvailable: boolean | undefined, anyAADAvailable: boolean | undefined, isUserSignedOut: boolean | undefined): boolean;
}
export declare function fillURLVariables(queryParams: string, url: string, widgetInstance: IWidgetInstanceInternal): Promise<string>;
export declare function getEntryPointOverride(registration: IWidgetRegistration, key: string): EntryPoint | null;
export declare function areWidgetInstancesInDefaultState(widgetInstances: Array<IWidgetInstanceInternal>, numDefaultWidgets: number): boolean;
export declare class WidgetOrchestratorImpl implements IWidgetOrchestrator {
    private _eventListeners;
    private _peregrineLoadListeners;
    private _peregrineLoadTimestamp;
    private _widgetHtmlElements;
    private _widgetInstanceManager;
    private _widgetRegistrar;
    private _widgetContentRefreshTimeSeconds;
    private static _listenderAddedForPCSFailure;
    constructor(widgetInstanceManager: IWidgetInstanceManager, widgetRegistrar: IWidgetRegistrar);
    getWidgetRegistrations(): Promise<Array<IWidgetRegistration>>;
    getRiverInstances(): Promise<Array<IWidgetInstanceInternal>>;
    getWidgetInstances(): Promise<Array<IWidgetInstanceInternal>>;
    getFeedInstance(): Promise<IWidgetInstanceInternal>;
    getWidget(widgetInstance: IWidgetInstanceInternal): Promise<WidgetInstanceElement>;
    addWidgetInstance(widgetRegistration: IWidgetRegistration, widgetId?: string): Promise<IWidgetInstanceInternal>;
    addWidgetInstanceForRiver(widgetRegistration: IWidgetRegistration): Promise<IWidgetInstanceInternal>;
    removeWidgetInstance(widgetInstance: IWidgetInstanceInternal): void;
    isRiverInstance(widgetInstance: IWidgetInstanceInternal): boolean;
    removeWidgetInstanceFromRiver(widgetInstance: IWidgetInstanceInternal, isHide: boolean): void;
    addEventListener(listener: (eventName: OrchestratorEvent, widgetInstance: IWidgetInstanceInternal | null) => void): void;
    removeEventListener(listener: (eventName: OrchestratorEvent, widgetInstance: IWidgetInstanceInternal | null) => void): void;
    updateWidgetInstance(widgetInstance: IWidgetInstanceInternal): Promise<IWidgetInstanceInternal>;
    sendAllPeregrineWidgetsToErrorState(widgetErrorStateReason: string): Promise<void>;
    peregrineWidgetStatusUpdated(widget: WidgetInstanceElement, oldVal: string, newVal: string): Promise<void>;
    listenForPeregrineStatus(): void;
    loadPeregrineWidget(widgetInstance: IWidgetInstanceInternal): void;
    loadSpecificPeregrineWidgets(widgetInstances: Array<IWidgetInstanceInternal>): void;
    isUserRegionChina(): boolean;
    isUserRegionUnitedStates(): boolean;
    loadPeregrineWidgets(): Promise<void>;
    reloadFailedWidgets(lifecycle: WidgetLifecycleEvent | null, forceReloadPage?: boolean): Promise<void>;
    reloadFailedWidgetsInDynamicFeed(widgetInstance: IWidgetInstanceInternal): Promise<void>;
    refreshWidgets(): Promise<boolean>;
    suspendWidgets(): Promise<void>;
    resumeWidgets(): Promise<void>;
    widgetInnerFocus(widgetInstance: IWidgetInstanceInternal): void;
    initializeOutlookWidgetAsync(widgetInstance: IWidgetInstanceInternal, widgetInstanceElement: WidgetInstanceElement, entryPointHost: string): Promise<void>;
    private reloadFailedNonPeregrineWidgets;
    getWidgetInitializerUrl(appType: string): string;
    private startInitialPeregrineWidgetLoad;
    private initializeWidget;
    private insertPlaceholderImage;
    private removeAttributeListener;
    private fireEvent;
    private getAllWidgetInstances;
}
export declare function getWidgetOrchestrator(): Promise<IWidgetOrchestrator>;
