import * as nanoevents from 'nanoevents';
import { Emitter, Unsubscribe, DefaultEvents } from 'nanoevents';
import Player from 'video.js/dist/types/player';

/**
 * Centralized event type definitions
 * All module events should be defined here
 */

/**
 * Events emitted by Layout
 */
interface ILayoutEvents {
    start: (layout: ILayout) => void;
    end: (layout: ILayout) => void;
    cancelled: (layout: ILayout) => void;
    layoutStart?: (layout: ILayout) => void;
    layoutEnd?: (layout: ILayout) => void;
}
/**
 * Events emitted by Region
 */
interface IRegionEvents {
    start: (region: IRegion) => void;
    end: (region: IRegion) => void;
}
/**
 * Events emitted by Media
 */
interface IMediaEvents {
    start: (media: IMedia) => void;
    end: (media: IMedia) => void;
    cancelled: (media: IMedia) => void;
}
/**
 * Type alias for event unsubscriber
 */
type EventUnsubscriber = () => void;
type EventEmitter<T> = <K extends keyof T>(event: K, ...args: Parameters<T[K] extends (...args: any[]) => any ? T[K] : never>) => void;

declare enum ConsumerPlatform {
    CMS = "CMS",
    CHROMEOS = "chromeOS",
    ELECTRON = "electron",
    IOS = "ios",
    MACOS = "macos",
    ANDROID = "android",
    LINUX = "linux",
    WINDOWS = "windows",
    WEBOS = "webos",
    TIZEN = "tizen"
}

declare class Action {
    readonly id: string;
    readonly xml: Element;
    constructor(id: string, xml: Element);
}
declare class ActionsWrapper extends HTMLDivElement {
    constructor();
}
type InactOptions = {
    [k: string]: any;
} & OptionsType['previewTranslations'];
declare class ActionController {
    readonly parent: ILayout;
    readonly actions: Action[];
    readonly options: InactOptions;
    readonly $container: HTMLElement | null;
    readonly $actionController: ActionsWrapper;
    readonly $actionListContainer: Element | null;
    $actionControllerTitle: HTMLElement | null;
    $actionsContainer: HTMLElement | null;
    translations: any;
    private keyboardHandler;
    constructor(parent: ILayout, actions: Action[], options: InactOptions);
    init(): void;
    openLayoutInNewTab(layoutCode: string, options: InactOptions): void;
    openLayoutInPlayer(layoutCode: string, _options: InactOptions): void;
    prevOrNextLayout(targetId: string, actionType: string): void;
    /** Change media in region (next/previous) with wrap-around at boundaries. */
    gotoMediaInRegion(regionId: string, actionType: string): void;
    loadMediaInRegion(regionId: string, widgetId: string): void;
    /** Run action based on action data */
    runAction(actionData: {
        [k: string]: any;
    }, options: InactOptions): void;
    initTouchActions(): void;
    /** Dispatch an incoming webhook trigger to any matching actions on this layout. */
    handleWebhookTrigger(triggerCode: string, widgetId?: string): void;
    initKeyboardActions(): void;
    /** Remove the keydown listener registered by initKeyboardActions. Call when the layout ends or is cancelled. */
    removeKeyboardActions(): void;
}

declare function initRenderingDOM(targetContainer: Element | null): void;
declare function getXlf(layoutOptions: OptionsType): Promise<string>;
declare function getLayout(params: GetLayoutParamType): GetLayoutType;
declare class Layout implements ILayout {
    id: number | null;
    layoutId: number;
    sw: number;
    sh: number;
    xw: number;
    xh: number;
    duration: number;
    zIndex: number;
    scaleFactor: number;
    sWidth: number;
    sHeight: number;
    offsetX: number;
    offsetY: number;
    bgColor: string;
    bgImage: string;
    bgId: string;
    containerName: string;
    regionMaxZIndex: number;
    ready: boolean;
    regionObjects: IRegion[];
    drawer: Element | null;
    allExpired: boolean;
    regions: IRegion[];
    actions: Action[];
    done: boolean;
    allEnded: boolean;
    emitter: Emitter<ILayoutEvents>;
    index: number;
    actionController: ActionController | undefined;
    enableStat: boolean;
    inLoop: boolean;
    xlfString: string;
    ad: any;
    isOverlay: boolean;
    shareOfVoice: number;
    state: ELayoutState;
    scheduleId?: number;
    layoutNode?: Document;
    path?: string;
    errorCode: number | null;
    html: HTMLElement | null;
    options: OptionsType;
    xlr: IXlr;
    private readonly layoutObj;
    protected readonly statsBC: BroadcastChannel;
    constructor(xlrLayoutObj: ILayout, options: OptionsType, xlr: IXlr, data?: Document);
    prepareLayout(): void;
    parseXlf(): void;
    run(): void;
    playRegions(): void;
    regionExpired(): void;
    end(): void;
    regionEnded(): void;
    stopAllMedia(): Promise<void>;
    resetLayout(): Promise<void>;
    finishAllRegions(): Promise<void[]>;
    removeLayout(caller?: LayoutPlaybackType): void;
    discardLayout(caller?: LayoutPlaybackType): void;
    getXlf(): string;
    isInterrupt(): boolean;
    on<E extends keyof ILayoutEvents>(event: E, callback: ILayoutEvents[E]): nanoevents.Unsubscribe;
}

interface IOverlayLayoutEvents extends ILayoutEvents {
}
declare class OverlayLayout extends Layout {
    emitter: Emitter<IOverlayLayoutEvents>;
    constructor(xlrLayoutObj: ILayout, options: OptionsType, xlr: IXlr, data?: Document);
    on<E extends keyof IOverlayLayoutEvents>(event: E, callback: IOverlayLayoutEvents[E]): Unsubscribe;
}

declare class OverlayLayoutManager {
    overlays: OverlayLayout[];
    container: HTMLElement;
    parent: IXlr;
    constructor();
    parseOverlays(list: any[]): Promise<Awaited<OverlayLayout[]>>;
    prepareOverlayLayouts(list: InputLayoutType[], parent: IXlr): Promise<void>;
    playOverlays(): void;
    stopOverlays(): void;
    resumeOverlays(): Promise<void>;
}

type PrepareLayoutsType = {
    moveNext?: boolean;
};
declare enum ELayoutType {
    CURRENT = 0,
    NEXT = 1
}
type IXlrEvents = {
    layoutChange: (layoutId: number) => void;
    layoutStart: (layout: ILayout) => void;
    layoutEnd: (layout: ILayout) => void;
    layoutError: (layout: ILayout) => void;
    widgetStart: (widgetId: number) => void;
    widgetEnd: (widgetId: number) => void;
    widgetError: (widgetId: number) => void;
    adRequest: (sspLayoutIndex: number) => void;
    sspWidgetRequest: (media: IMedia) => void;
    sspWidgetEnd: (impressionUrls: string[], errorUrls: string[], duration: number) => void;
    updateLoop: (inputLayouts: InputLayoutType[]) => void;
    updateOverlays: (overlays: InputLayoutType[]) => void;
    overlayStart: (overlay: ILayout) => void;
    overlayEnd: (overlay: ILayout) => void;
    commandCodeReceived: (commandCode: string) => void;
    commandStringReceived: (commandString: string) => void;
    navLayout: (layoutCode: string, url: string) => void;
};
interface IXlrPlayback {
    currentLayout: ILayout | undefined;
    nextLayout: ILayout | undefined;
    currentLayoutIndex: number;
    nextLayoutIndex: number;
    isCurrentLayoutValid: boolean;
    hasDefaultOnly: boolean;
}
interface IXlr {
    bootstrap(): void;
    config: OptionsType;
    currentLayout: ILayout | undefined;
    currentLayoutId: number;
    currentLayoutIndex: number;
    emitSync<E extends keyof IXlrEvents>(eventName: E, ...args: Parameters<IXlrEvents[E]>): Promise<void>;
    emitter: Emitter<IXlrEvents>;
    getLayout(inputLayout: InputLayoutType): ILayout | undefined;
    getLayoutById(layoutId: number, layoutIndex?: number): ILayout | undefined;
    gotoNextLayout(): void;
    gotoPrevLayout(): void;
    /**
     * Navigate directly to a layout identified by its CMS code string.
     * Searches parsed layouts first, then fetches unparsed XLF files via appHost.
     * No-ops silently if the code is not found in the current loop.
     */
    gotoLayoutByCode(layoutCode: string): Promise<void>;
    /**
     * Play the given layout once as an interrupt, then resume the current loop.
     * Used by non-CMS platforms for Navigate to Layout interactive actions.
     * The interrupt is not part of inputLayouts and is spliced in temporarily.
     */
    playInterruptLayout(inputLayout: InputLayoutType): Promise<void>;
    /**
     * Dispatch an incoming webhook trigger code to the current layout's
     * action controller. Pass an optional widgetId to narrow the match.
     */
    triggerAction(triggerCode: string, widgetId?: string): void;
    init(): Promise<IXlr>;
    inputLayouts: InputLayoutType[];
    isInterrupted: boolean;
    isLayoutInDOM(containerName: string, layoutId: number): boolean;
    cleanupOrphanedLayouts(keepCurrent?: ILayout | null, keepNext?: ILayout | null): void;
    isSspEnabled: boolean;
    isUpdatingLoop: boolean;
    isUpdatingOverlays: boolean;
    layouts: Record<string, ILayout>;
    nextLayout: ILayout | undefined;
    on<E extends keyof IXlrEvents>(event: E, callback: IXlrEvents[E]): Unsubscribe;
    overlayLayoutManager: OverlayLayoutManager;
    overlays: InputLayoutType[];
    parseLayouts(loopUpdate?: boolean): IXlrPlayback;
    playLayouts(xlr: IXlr): void;
    playSchedules(xlr: IXlr): Promise<void>;
    prepareForSsp(nextLayout: ILayout): Promise<ILayout>;
    prepareLayoutXlf(inputLayout: ILayout | undefined): Promise<ILayout>;
    prepareLayouts(): Promise<IXlr>;
    renderOverlayLayouts(): Promise<void>;
    uniqueLayouts: Map<string, InputLayoutType>;
    updateInputLayout(layoutIndex: number, layout: InputLayoutType): void;
    updateLayouts(inputLayouts: InputLayoutType[]): void;
    updateLoop(inputLayouts: InputLayoutType[]): Promise<void>;
    updateOverlays(overlays: InputLayoutType[]): Promise<void>;
    updateScheduleLayouts(scheduleLayouts: InputLayoutType[]): Promise<void>;
}
declare const initialXlr: IXlr;

declare function composeVideoSource($media: HTMLVideoElement, media: IMedia): HTMLVideoElement;
declare const defaultVjsOpts: {
    autoplay: boolean;
    muted: boolean;
    preload: string;
    controls: boolean;
};
declare const vjsDefaultOptions: (opts?: any) => any;
interface IVideoMediaHandler {
    player: Player | undefined;
    duration: number;
    init(): void;
    play(): void;
    stop(disposeOnly?: boolean): void;
}
declare const reportToPlayerPlatform: ConsumerPlatform[];
declare function VideoMedia(media: IMedia, xlr: IXlr): {
    player: Player | undefined;
    duration: number;
    init: () => void;
    stop: (disposeOnly?: boolean) => void;
    play: () => void;
};

declare class Media implements IMedia {
    attachedAudio: boolean;
    checkIframeStatus: boolean;
    containerName: string;
    divHeight: number;
    divWidth: number;
    duration: number;
    emitter: Emitter<IMediaEvents>;
    enableStat: boolean;
    fileId: string;
    finished: boolean;
    fromDt: string;
    html: HTMLElement | null;
    id: string;
    idCounter: number;
    iframe: HTMLIFrameElement | null;
    iframeName: string;
    index: number;
    loadIframeOnRun: boolean;
    loop: boolean;
    mediaId: string;
    mediaType: string;
    muted?: boolean;
    options: OptionsType & {
        [k: string]: any;
    };
    player?: Player;
    ready: boolean;
    region: IRegion;
    render: string;
    schemaVersion: string;
    singlePlay: boolean;
    state: MediaState;
    tempSrc: string;
    timeoutId: ReturnType<typeof setTimeout>;
    toDt: string;
    type: string;
    uri: string;
    url: string | null;
    useDuration: boolean;
    xml: Element | null;
    videoHandler?: IVideoMediaHandler;
    mediaTimer: ReturnType<typeof setInterval> | undefined;
    sspImpressionUrls: string[] | undefined;
    sspErrorUrls: string[] | undefined;
    private isSspWidget;
    private mediaTimeCount;
    private xlr;
    private readonly statsBC;
    private hasCommandExecuted;
    constructor(region: IRegion, mediaId: string, xml: Element, options: OptionsType, xlr: IXlr);
    private startMediaTimer;
    private on;
    private init;
    run(): void;
    setSspAdUrl(url: string, adMediaType: 'image' | 'video', impressionUrls?: string[], errorUrls?: string[]): void;
    stop(): Promise<void>;
    /**
     * Emits a command from the shell command widget.
     *
     * @param media
     * @private
     */
    private emitCommand;
}

declare function AudioMedia(media: IMedia): {
    init(): void;
};

type MediaState = 'idle' | 'playing' | 'ended' | 'cancelled';
declare const MediaState: {
    readonly IDLE: "idle";
    readonly PLAYING: "playing";
    readonly ENDED: "ended";
    readonly CANCELLED: "cancelled";
};
interface IMedia {
    attachedAudio: boolean;
    checkIframeStatus: boolean;
    containerName: string;
    divHeight: number;
    divWidth: number;
    duration: number;
    emitter: Emitter<IMediaEvents>;
    enableStat: boolean;
    fileId: string;
    finished: boolean;
    fromDt: string;
    html: HTMLElement | null;
    id: string;
    idCounter: number;
    iframe: HTMLIFrameElement | null;
    iframeName: string;
    index: number;
    loadIframeOnRun: boolean;
    loop: boolean;
    mediaId: string;
    mediaType: string;
    muted?: boolean;
    options: OptionsType & {
        [k: string]: any;
    };
    player?: Player;
    ready: boolean;
    region: IRegion;
    render: string;
    run(): void;
    setSspAdUrl(url: string, adMediaType: 'image' | 'video', impressionUrls?: string[], errorUrls?: string[]): void;
    sspImpressionUrls: string[] | undefined;
    sspErrorUrls: string[] | undefined;
    schemaVersion: string;
    singlePlay: boolean;
    state: MediaState;
    stop(): Promise<void>;
    tempSrc: string;
    timeoutId: ReturnType<typeof setTimeout>;
    toDt: string;
    type: string;
    uri: string;
    url: string | null;
    useDuration: boolean;
    xml: Element | null;
    videoHandler?: IVideoMediaHandler;
    mediaTimer: ReturnType<typeof setInterval> | undefined;
}

interface IRegion {
    complete: boolean;
    containerName: string;
    currMedia: IMedia | undefined;
    currEl: HTMLElement | null;
    currentMedia: number;
    currentMediaIndex: number;
    emitter?: Emitter<DefaultEvents>;
    end(): void;
    ended: boolean;
    ending: boolean;
    exitTransition(): void;
    exitTransitionComplete(): void;
    finished(): void;
    html: HTMLDivElement;
    id: string;
    index: number;
    layout: ILayout;
    mediaObjects: IMedia[];
    mediaObjectsActions: IMedia[];
    nxtMedia: IMedia | undefined;
    nxtEl: HTMLElement | null;
    offsetX: number;
    offsetY: number;
    oldMedia: IMedia | undefined;
    on<E extends keyof IRegionEvents>(event: E, callback: IRegionEvents[E]): Unsubscribe;
    oneMedia: boolean;
    options: {
        [k: string]: any;
    };
    playNextMedia(): void;
    playPreviousMedia(): void;
    prepareMedia(media: IMedia): void;
    prepareMediaObjects(): void;
    prepareRegion(): void;
    ready: boolean;
    regionId: string;
    reset(): void;
    run(): void;
    sHeight: number;
    sWidth: number;
    totalMediaObjects: number;
    transitionNodes(oldMedia: IMedia | undefined, newMedia: IMedia | undefined): void;
    uniqueId: string;
    xml: null | Element;
    zIndex: number;
    prepareNextMedia(): void;
    xlr: IXlr;
}
declare const initialRegion: IRegion;

declare enum ELayoutState {
    IDLE = 0,
    RUNNING = 1,
    PLAYED = 2,
    CANCELLED = 3,
    ERROR = 4
}
declare enum LayoutPlaybackType {
    CURRENT = "current",
    NEXT = "next",
    OVERLAY = "overlay"
}
type InputLayoutType = {
    response: any;
    layoutId: number;
    path?: string;
    index?: number;
    id?: number;
    ad?: any;
    getXlf?(): string;
    duration?: number;
    isOverlay?: boolean;
    shareOfVoice?: number;
    code?: string;
};
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;
    };
};
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: ActionController | 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;
}
declare const initialLayout: ILayout;
type GetLayoutParamType = {
    xlr: IXlr;
    moveNext?: boolean;
};
type GetLayoutType = {
    currentLayoutIndex: number;
    nextLayoutIndex: number;
    inputLayouts: InputLayoutType[];
    current: ILayout | undefined;
    next: ILayout | undefined;
};

declare function XiboLayoutRenderer(inputLayouts: InputLayoutType[], overlays: InputLayoutType[], options?: OptionsType): IXlr;

declare function nextId(options: {
    idCounter: number;
}): number;
declare const getMediaId: ({ mediaType, containerName }: IMedia) => string;
declare const capitalizeStr: (inputStr: string) => string;
declare function getDataBlob(src: string, jwtToken: string | null): Promise<unknown>;
type MediaTypes = 'video' | 'audio' | 'image';
declare function preloadMediaBlob(src: string, type: MediaTypes, jwtToken: string | null): Promise<string>;
declare function fetchJSON(url: string, jwtToken: string | null): Promise<any>;
declare function fetchText(url: string, jwtToken: string | null): Promise<string>;
declare function getFileExt(filename: string): string;
declare function audioFileType(str: string): string | undefined;
declare function videoFileType(str: string): string | undefined;
declare function composeResourceUrlByPlatform(options: OptionsType, params: any): string;
declare function composeResourceUrl(options: OptionsType, params: any): string;
declare function composeMediaUrl(params: any): string;
declare function composeBgUrlByPlatform(platform: OptionsType['platform'], params: ILayout): string;
type LayoutIndexType = {
    [k: string]: InputLayoutType & {
        index: number;
    };
};
declare function getIndexByLayoutId(layoutsInput: InputLayoutType[], layoutId?: number | null): (InputLayoutType & {
    index: number;
}) | LayoutIndexType | {
    index: number;
};
declare function isEmpty(input: any): boolean;
declare function getAllAttributes(elem: Element): {
    [k: string]: any;
};
/**
 * Create expiration day based on current date
 * @param numDays Number of days as expiry
 * @returns JSON string format of date
 */
declare function setExpiry(numDays: number): string;
/**
 * Check whether a media item is currently within its valid date window.
 * Returns true when the media should be shown, false when it should be skipped.
 *
 * Rules:
 *  - Empty / invalid fromDt  → treat as "no start restriction"
 *  - Empty / invalid toDt    → treat as "no expiry"
 *  - now < fromDt            → not yet active   → skip
 *  - now > toDt              → expired          → skip
 */
declare function isMediaActive(fromDt: string, toDt: string): boolean;
/**
 * Check if given layout exists in the loop using layoutId
 * @param layouts Schedule loop unique layouts (uniqueLayouts)
 * @param layoutId Layout ID of the layout to look for
 *
 * @return boolean
 */
declare function isLayoutValid(layouts: InputLayoutType[], layoutId: number | undefined): boolean;
declare function getLayoutIndexByLayoutId(layouts: InputLayoutType[], layoutId: number): number | null;
declare function hasDefaultOnly(inputLayouts: InputLayoutType[]): boolean;
declare function hasSspLayout(inputLayouts: InputLayoutType[], defaultValue?: boolean): boolean;
declare function createMediaElement(mediaObject: IMedia): HTMLElement;
declare function prepareVideoMedia(media: IMedia, region: IRegion): void;
declare function prepareImageMedia(media: IMedia, region: IRegion): void;
declare function prepareAudioMedia(media: IMedia, region: IRegion): void;
declare function prepareHtmlMedia(media: IMedia, region: IRegion): void;
declare enum FaultCodes {
    FaultVideoSource = 2001,
    FaultVideoUnexpected = 2099
}
declare function playerReportFault(msg: string, media: IMedia, code?: number): Promise<void>;

declare class Region implements IRegion {
    layout: ILayout;
    xml: Element | null;
    regionId: string;
    options: OptionsType;
    xlr: IXlr;
    complete: boolean;
    containerName: string;
    currMedia: IMedia | undefined;
    currEl: HTMLElement | null;
    currentMedia: number;
    currentMediaIndex: number;
    ended: boolean;
    ending: boolean;
    html: HTMLDivElement;
    id: string;
    index: number;
    mediaObjects: IMedia[];
    mediaObjectsActions: IMedia[];
    nxtMedia: IMedia | undefined;
    nxtEl: HTMLElement | null;
    offsetX: number;
    offsetY: number;
    oldMedia: IMedia | undefined;
    oneMedia: boolean;
    ready: boolean;
    sHeight: number;
    sWidth: number;
    totalMediaObjects: number;
    uniqueId: string;
    zIndex: number;
    emitter: nanoevents.Emitter<IRegionEvents>;
    constructor(layout: ILayout, xml: Element, regionId: string, options: OptionsType, xlr: IXlr);
    prepareRegion(): void;
    prepareMedia(media: IMedia): void;
    prepareFirstMedia(): void;
    prepareNextMedia(): void;
    prepareMediaObjects(): void;
    finished(): void;
    run(): void;
    transitionNodes(oldMedia: IMedia | undefined, newMedia: IMedia | undefined): void;
    playNextMedia(): void;
    playPreviousMedia(): void;
    end(): void;
    exitTransition(): void;
    exitTransitionComplete(): void;
    reset(): void;
    on<E extends keyof IRegionEvents>(event: E, callback: IRegionEvents[E]): nanoevents.Unsubscribe;
}

interface ISplashScreen {
    init: () => void;
    show: () => void;
    hide: () => void;
}
interface PreviewSplashElement extends HTMLDivElement {
    hide: () => void;
    show: () => void;
}

declare const defaultTrans: (duration: number, trans: 'in' | 'out') => {
    keyframes: {
        display: string;
    }[];
    timing: KeyframeAnimationOptions;
};
declare const fadeInElem: (duration: number) => {
    keyframes: {
        opacity: number;
    }[];
    timing: KeyframeAnimationOptions;
};
declare const fadeOutElem: (duration: number) => {
    keyframes: ({
        opacity: number;
        zIndex?: undefined;
    } | {
        opacity: number;
        zIndex: number;
    })[];
    timing: KeyframeAnimationOptions;
};
type KeyframeOptionsType = {
    from: {
        [k: string]: any;
    };
    to: {
        [k: string]: any;
    };
};
declare const flyInElem: (duration: number, keyframeOptions: KeyframeOptionsType | undefined, direction?: string) => {
    keyframes: ({
        opacity: number;
        zIndex?: undefined;
    } | {
        opacity: number;
        zIndex: number;
    })[];
    timing: KeyframeAnimationOptions;
};
declare const flyOutElem: (duration: number, keyframeOptions: KeyframeOptionsType | undefined, direction?: string) => {
    keyframes: Keyframe[];
    timing: KeyframeAnimationOptions;
};
type TransitionNameType = 'fadeIn' | 'fadeOut' | 'flyIn' | 'flyOut' | 'defaultIn' | 'defaultOut';
type TransitionElementOptions = {
    duration: number;
    keyframes?: KeyframeOptionsType;
    direction?: string;
};
declare const transitionElement: (transition: TransitionNameType, options: TransitionElementOptions) => {
    keyframes: {
        display: string;
    }[];
    timing: KeyframeAnimationOptions;
} | {
    keyframes: {
        opacity: number;
    }[];
    timing: KeyframeAnimationOptions;
} | {
    keyframes: ({
        opacity: number;
        zIndex?: undefined;
    } | {
        opacity: number;
        zIndex: number;
    })[];
    timing: KeyframeAnimationOptions;
} | {
    keyframes: ({
        opacity: number;
        zIndex?: undefined;
    } | {
        opacity: number;
        zIndex: number;
    })[];
    timing: KeyframeAnimationOptions;
} | {
    keyframes: Keyframe[];
    timing: KeyframeAnimationOptions;
};
type compassPoints = 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW';
type flyTransitionParams = {
    trans: 'in' | 'out';
    direction: compassPoints;
    height: string | number;
    width: string | number;
};
declare const flyTransitionKeyframes: (params: flyTransitionParams) => KeyframeOptionsType;

export { Action, ActionsWrapper, AudioMedia, ConsumerPlatform, ELayoutState, ELayoutType, type EventEmitter, type EventUnsubscriber, FaultCodes, type GetLayoutParamType, type GetLayoutType, type ILayout, type ILayoutEvents, type IMedia, type IMediaEvents, type IRegion, type IRegionEvents, type ISplashScreen, type IVideoMediaHandler, type IXlr, type IXlrEvents, type IXlrPlayback, type InactOptions, type InputLayoutType, type KeyframeOptionsType, LayoutPlaybackType, Media, MediaState, type MediaTypes, type OptionsType, type PrepareLayoutsType, type PreviewSplashElement, Region, type TransitionElementOptions, type TransitionNameType, VideoMedia, audioFileType, capitalizeStr, type compassPoints, composeBgUrlByPlatform, composeMediaUrl, composeResourceUrl, composeResourceUrlByPlatform, composeVideoSource, createMediaElement, XiboLayoutRenderer as default, defaultTrans, defaultVjsOpts, fadeInElem, fadeOutElem, fetchJSON, fetchText, flyInElem, flyOutElem, flyTransitionKeyframes, type flyTransitionParams, getAllAttributes, getDataBlob, getFileExt, getIndexByLayoutId, getLayout, getLayoutIndexByLayoutId, getMediaId, getXlf, hasDefaultOnly, hasSspLayout, initRenderingDOM, initialLayout, initialRegion, initialXlr, isEmpty, isLayoutValid, isMediaActive, nextId, playerReportFault, preloadMediaBlob, prepareAudioMedia, prepareHtmlMedia, prepareImageMedia, prepareVideoMedia, reportToPlayerPlatform, setExpiry, transitionElement, videoFileType, vjsDefaultOptions };
