import { Emitter, Unsubscribe } from 'nanoevents';
import { IRegion } from '../Region';
import { IXlr } from '../XLR';
import InteractiveActions, { Action } from '../../Modules/ActionController';
import { ILayoutEvents } from "../Events";
import { ConsumerPlatform } from "../Platform";
export declare enum ELayoutState {
    IDLE = 0,
    RUNNING = 1,
    PLAYED = 2,
    CANCELLED = 3,
    ERROR = 4
}
export declare enum LayoutPlaybackType {
    CURRENT = "current",
    NEXT = "next",
    OVERLAY = "overlay"
}
export type InputLayoutType = {
    response: any;
    layoutId: number;
    path?: string;
    index?: number;
    id?: number;
    ad?: any;
    getXlf?(): string;
    duration?: number;
    isOverlay?: boolean;
    shareOfVoice?: number;
    code?: string;
};
export type OptionsType = {
    xlfUrl: string;
    getResourceUrl: string;
    layoutBackgroundDownloadUrl: string;
    layoutPreviewUrl: string;
    loaderUrl: string;
    previewJwt: string;
    idCounter: number;
    inPreview: boolean;
    appHost?: string | null;
    platform: ConsumerPlatform;
    config?: {
        cmsUrl: string | null;
        schemaVersion: number;
        cmsKey: string | null;
        hardwareKey: string | null;
    };
    previewTranslations?: {
        [k: string]: any;
    };
    icons?: {
        splashScreen: string;
        logo: string;
    };
};
export interface ILayout {
    id: number | null;
    layoutId: number;
    scheduleId?: number;
    sw: number | null;
    sh: number | null;
    xw: number | null;
    xh: number | null;
    duration: number;
    zIndex: number | null;
    scaleFactor: number;
    sWidth: number;
    sHeight: number;
    offsetX: number;
    offsetY: number;
    bgColor: string;
    bgImage: string;
    bgId: string;
    containerName: string;
    layoutNode?: Document;
    regionMaxZIndex: number;
    ready: boolean;
    regionObjects: IRegion[];
    drawer: Element | null;
    allExpired: boolean;
    regions: IRegion[];
    actions: Action[];
    options: OptionsType;
    done: boolean;
    allEnded: boolean;
    path?: string;
    prepareLayout(): void;
    parseXlf(): void;
    run(): void;
    emitter: Emitter<ILayoutEvents>;
    on<E extends keyof ILayoutEvents>(event: E, callback: ILayoutEvents[E]): Unsubscribe;
    regionExpired(): void;
    end(): void;
    regionEnded(): void;
    stopAllMedia(): Promise<void>;
    resetLayout(): Promise<void>;
    index: number;
    actionController: InteractiveActions | undefined;
    enableStat: boolean;
    xlr: IXlr;
    finishAllRegions(): Promise<void[]>;
    inLoop: boolean;
    removeLayout(caller?: LayoutPlaybackType): void;
    discardLayout(caller?: LayoutPlaybackType): void;
    xlfString: string;
    getXlf(): string;
    ad: any;
    isOverlay: boolean;
    shareOfVoice: number;
    isInterrupt(): boolean;
    state: ELayoutState;
    errorCode: number | null;
    html: HTMLElement | null;
}
export declare const initialLayout: ILayout;
export type GetLayoutParamType = {
    xlr: IXlr;
    moveNext?: boolean;
};
export type GetLayoutType = {
    currentLayoutIndex: number;
    nextLayoutIndex: number;
    inputLayouts: InputLayoutType[];
    current: ILayout | undefined;
    next: ILayout | undefined;
};
