import { CoreTypes } from '../core-types';
import type { View } from '../ui/core/view';
import type { NavigationEntry } from '../ui/frame/frame-interfaces';
import type { AndroidApplication as AndroidApplicationType, iOSApplication as iOSApplicationType } from '.';
import type { ApplicationEventData, CssChangedEventData, DiscardedErrorEventData, FontScaleChangedEventData, LaunchEventData, OrientationChangedEventData, SystemAppearanceChangedEventData, LayoutDirectionChangedEventData, UnhandledErrorEventData } from './application-interfaces';
export declare function initializeSdkVersionClass(rootView: View): void;
export declare const SceneEvents: {
    sceneWillConnect: string;
    sceneDidActivate: string;
    sceneWillResignActive: string;
    sceneWillEnterForeground: string;
    sceneDidEnterBackground: string;
    sceneDidDisconnect: string;
    sceneContentSetup: string;
};
export type SceneEventName = (typeof SceneEvents)[keyof typeof SceneEvents];
interface ApplicationEvents {
    off(eventNames: string, callback?: any, thisArg?: any): void;
    notify<T = ApplicationEventData>(eventData: T): void;
    hasListeners(eventName: string): boolean;
    on(eventNames: string, callback: (args: ApplicationEventData) => void, thisArg?: any): void;
    /**
     * This event is raised when application css is changed.
     */
    on(event: 'cssChanged', callback: (args: CssChangedEventData) => void, thisArg?: any): void;
    /**
     * Event raised then livesync operation is performed.
     */
    on(event: 'livesync', callback: (args: ApplicationEventData) => void, thisArg?: any): void;
    /**
     * This event is raised on application launchEvent.
     */
    on(event: 'launch', callback: (args: LaunchEventData) => void, thisArg?: any): void;
    /**
     * This event is raised after the application has performed most of its startup actions.
     * Its intent is to be suitable for measuring app startup times.
     * @experimental
     */
    on(event: 'displayed', callback: (args: ApplicationEventData) => void, thisArg?: any): void;
    /**
     * This event is raised when the Application is suspended.
     */
    on(event: 'suspend', callback: (args: ApplicationEventData) => void, thisArg?: any): void;
    /**
     * This event is raised when the Application is resumed after it has been suspended.
     */
    on(event: 'resume', callback: (args: ApplicationEventData) => void, thisArg?: any): void;
    /**
     * This event is raised when the Application is about to exit.
     */
    on(event: 'exit', callback: (args: ApplicationEventData) => void, thisArg?: any): void;
    /**
     * This event is raised when there is low memory on the target device.
     */
    on(event: 'lowMemory', callback: (args: ApplicationEventData) => void, thisArg?: any): void;
    /**
     * This event is raised when an uncaught error occurs while the application is running.
     */
    on(event: 'uncaughtError', callback: (args: UnhandledErrorEventData) => void, thisArg?: any): void;
    /**
     * This event is raised when an discarded error occurs while the application is running.
     */
    on(event: 'discardedError', callback: (args: DiscardedErrorEventData) => void, thisArg?: any): void;
    /**
     * This event is raised when the orientation of the application changes.
     */
    on(event: 'orientationChanged', callback: (args: OrientationChangedEventData) => void, thisArg?: any): void;
    /**
     * This event is raised when the operating system appearance changes
     * between light and dark theme (for Android);
     * between light and dark mode (for iOS) and vice versa.
     */
    on(event: 'systemAppearanceChanged', callback: (args: SystemAppearanceChangedEventData) => void, thisArg?: any): void;
    /**
     * This event is raised when the operating system layout direction changes
     * between ltr and rtl.
     */
    on(event: 'layoutDirectionChanged', callback: (args: LayoutDirectionChangedEventData) => void, thisArg?: any): void;
    on(event: 'fontScaleChanged', callback: (args: FontScaleChangedEventData) => void, thisArg?: any): void;
}
export declare class ApplicationCommon {
    readonly launchEvent = "launch";
    readonly suspendEvent = "suspend";
    readonly displayedEvent = "displayed";
    readonly backgroundEvent = "background";
    readonly foregroundEvent = "foreground";
    readonly resumeEvent = "resume";
    readonly exitEvent = "exit";
    readonly lowMemoryEvent = "lowMemory";
    readonly uncaughtErrorEvent = "uncaughtError";
    readonly discardedErrorEvent = "discardedError";
    readonly orientationChangedEvent = "orientationChanged";
    readonly systemAppearanceChangedEvent = "systemAppearanceChanged";
    readonly layoutDirectionChangedEvent = "layoutDirectionChanged";
    readonly fontScaleChangedEvent = "fontScaleChanged";
    readonly livesyncEvent = "livesync";
    readonly loadAppCssEvent = "loadAppCss";
    readonly cssChangedEvent = "cssChanged";
    readonly initRootViewEvent = "initRootView";
    /**
     * @deprecated Use `Application.android.on()` instead.
     */
    static on: ApplicationEvents['on'];
    /**
     * @deprecated Use `Application.android.once()` instead.
     */
    static once: ApplicationEvents['on'];
    /**
     * @deprecated Use `Application.android.off()` instead.
     */
    static off: ApplicationEvents['off'];
    /**
     * @deprecated Use `Application.android.notify()` instead.
     */
    static notify: ApplicationEvents['notify'];
    /**
     * @deprecated Use `Application.android.hasListeners()` instead.
     */
    static hasListeners: ApplicationEvents['hasListeners'];
    on: ApplicationEvents['on'];
    once: ApplicationEvents['on'];
    off: ApplicationEvents['off'];
    notify: ApplicationEvents['notify'];
    hasListeners: ApplicationEvents['hasListeners'];
    private _orientation;
    private _systemAppearance;
    private _layoutDirection;
    private _inBackground;
    private _suspended;
    private _cssFile;
    protected mainEntry: NavigationEntry;
    started: boolean;
    /**
     * Boolean to enable/disable systemAppearanceChanged
     */
    autoSystemAppearanceChanged: boolean;
    /**
     * @internal - should not be constructed by the user.
     */
    constructor();
    /**
     * @internal
     */
    livesync(rootView: View, context?: ModuleContext): void;
    /**
     * Applies the the `newCssClass` to the `rootView` and removes all other css classes from `cssClasses`
     * previously applied to the `rootView`.
     * @param rootView
     * @param cssClasses
     * @param newCssClass
     * @param skipCssUpdate
     */
    applyCssClass(rootView: View, cssClasses: string[], newCssClass: string, skipCssUpdate?: boolean): void;
    private addCssClass;
    private removeCssClass;
    private increaseStyleScopeApplicationCssSelectorVersion;
    private setRootViewCSSClasses;
    /**
     * iOS Only
     * Dynamically change the preferred frame rate
     * For devices (iOS 15+) which support min/max/preferred frame rate you can specify ranges
     * For devices (iOS < 15), you can specify the max frame rate
     * see: https://developer.apple.com/documentation/quartzcore/optimizing_promotion_refresh_rates_for_iphone_13_pro_and_ipad_pro
     * To use, ensure your Info.plist has:
     * ```xml
     *   <key>CADisableMinimumFrameDurationOnPhone</key>
     *   <true/>
     * ```
     * @param options { min?: number; max?: number; preferred?: number }
     */
    setMaxRefreshRate(options?: {
        min?: number;
        max?: number;
        preferred?: number;
    }): void;
    /**
     * @returns The main entry of the application
     */
    getMainEntry(): any;
    protected notifyLaunch(additionalLanchEventData?: any): View | null;
    createRootView(view?: View, fireLaunchEvent?: boolean, additionalLanchEventData?: any): View;
    getRootView(): View;
    resetRootView(entry?: NavigationEntry | string): void;
    initRootView(rootView: View): void;
    /**
     * Get application level static resources.
     */
    getResources(): any;
    /**
     * Set application level static resources.
     */
    setResources(res: any): void;
    /**
     * Sets css file name for the application.
     */
    setCssFileName(cssFileName: string): void;
    /**
     * Gets css file name for the application.
     */
    getCssFileName(): string;
    /**
     * Loads immediately the app.css.
     * By default the app.css file is loaded shortly after "loaded".
     * For the Android snapshot the CSS can be parsed during the snapshot generation,
     * as the CSS does not depend on runtime APIs, and loadAppCss will be called explicitly.
     */
    loadAppCss(): void;
    addCss(cssText: string, attributeScoped?: boolean): void;
    run(entry?: string | NavigationEntry): void;
    protected getOrientation(): 'portrait' | 'landscape' | 'unknown';
    protected setOrientation(value: 'portrait' | 'landscape' | 'unknown'): void;
    orientation(): 'portrait' | 'landscape' | 'unknown';
    orientationChanged(rootView: View, newOrientation: 'portrait' | 'landscape' | 'unknown'): void;
    getNativeApplication(): any;
    hasLaunched(): boolean;
    protected getSystemAppearance(): 'dark' | 'light' | null;
    protected setSystemAppearance(value: 'dark' | 'light'): void;
    systemAppearance(): 'dark' | 'light' | null;
    /**
     * enable/disable systemAppearanceChanged
     */
    setAutoSystemAppearanceChanged(value: boolean): void;
    /**
     * Updates root view classes including those of modals
     * @param rootView the root view
     * @param newSystemAppearance the new appearance change
     */
    systemAppearanceChanged(rootView: View, newSystemAppearance: 'dark' | 'light'): void;
    protected getLayoutDirection(): CoreTypes.LayoutDirectionType | null;
    protected setLayoutDirection(value: CoreTypes.LayoutDirectionType): void;
    layoutDirection(): CoreTypes.LayoutDirectionType | null;
    /**
     * Updates root view classes including those of modals
     * @param rootView the root view
     * @param newLayoutDirection the new layout direction change
     */
    layoutDirectionChanged(rootView: View, newLayoutDirection: CoreTypes.LayoutDirectionType): void;
    get inBackground(): boolean;
    setInBackground(value: boolean, additonalData?: any): void;
    get suspended(): boolean;
    setSuspended(value: boolean, additonalData?: any): void;
    get android(): AndroidApplicationType;
    get ios(): iOSApplicationType;
    get AndroidApplication(): AndroidApplicationType;
    get iOSApplication(): iOSApplicationType;
}
export {};
