import { ComponentOptionsMixin } from 'vue';
import { ComponentProvideOptions } from 'vue';
import { CreateComponentPublicInstanceWithMixins } from 'vue';
import { default as default_2 } from 'postmate';
import { DefineComponent } from 'vue';
import { GlobalComponents } from 'vue';
import { GlobalDirectives } from 'vue';
import { PublicProps } from 'vue';

declare type __VLS_Props = {
    /**
     * 文件播放地址 or 文件元信息
     */
    file: string | FileMetas | undefined;
    /**
     * 播放的初始页
     */
    defaultPage?: number;
    /**
     * 播放的初始页内第 N 个动画
     *
     * (只针对含动画的 PPT 有效)
     */
    defaultStep?: number;
    /**
     * 播放的初始缩放比例
     */
    defaultZoom?: number;
    /**
     * 是否垂直播放
     *
     * (只针对 PPT 有效)
     */
    vertical?: boolean | "true" | "false";
    /**
     * 暗黑风格
     */
    dark?: boolean | "true" | "false";
    /**
     * 主题色
     *
     * 用于自定义播放器的主题颜色
     */
    themeColor?: string;
    /**
     * 是否无头模式
     */
    headless?: boolean;
    /**
     * 引擎基础 URL
     *
     * 用于按需载入引擎的脚本、WASM、Iframe等。
     */
    engineBaseUrl?: string;
    /**
     * 是否开发模式
     *
     * 开发模式下，引擎地址引用的是 localhost 地址，engineBaseUrl 配置不生效
     */
    dev?: boolean;
    /**
     * 客户端类型
     *
     * 用于区分不同设备类型，以便调整播放器行为
     */
    clientType?: "pc" | "ipad" | "mobile";
};

export declare const CloudFilePlayer: DefineComponent<__VLS_Props, {
prev: () => void;
next: () => void;
goto: (pos: Position) => void;
zoomIn: () => void;
zoomOut: () => void;
zoomTo: (zoom: number) => void;
thumbs: () => Thumb[];
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
paginationChange: (pagination: Pagination) => any;
zoomChange: (zoom: number) => any;
fullscreen: () => any;
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
onPaginationChange?: ((pagination: Pagination) => any) | undefined;
onZoomChange?: ((zoom: number) => any) | undefined;
onFullscreen?: (() => any) | undefined;
}>, {
defaultPage: number;
defaultStep: number;
headless: boolean;
dev: boolean;
dark: boolean | "true" | "false";
vertical: boolean | "true" | "false";
defaultZoom: number;
clientType: "pc" | "ipad" | "mobile";
themeColor: string;
}, {}, {}, {}, string, ComponentProvideOptions, false, {
playerEl: HTMLDivElement;
engineEl: CreateComponentPublicInstanceWithMixins<Readonly<{
metas: FileMetas;
viewportSize: RectangleSize;
defaultPage?: number;
headless?: boolean;
dev?: boolean;
}> & Readonly<{
onPaginationChange?: ((pagination: Pagination) => any) | undefined;
onLoading?: ((args_0: boolean) => any) | undefined;
}>, {
prev: () => Promise<void>;
next: () => Promise<void>;
goto: (pos: Position) => Promise<void>;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
paginationChange: (pagination: Pagination) => any;
loading: (args_0: boolean) => any;
}, PublicProps, {
defaultPage: number;
headless: boolean;
dev: boolean;
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
contentEl: HTMLDivElement;
}, HTMLDivElement, ComponentProvideOptions, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, Readonly<{
metas: FileMetas;
viewportSize: RectangleSize;
defaultPage?: number;
headless?: boolean;
dev?: boolean;
}> & Readonly<{
onPaginationChange?: ((pagination: Pagination) => any) | undefined;
onLoading?: ((args_0: boolean) => any) | undefined;
}>, {
prev: () => Promise<void>;
next: () => Promise<void>;
goto: (pos: Position) => Promise<void>;
}, {}, {}, {}, {
defaultPage: number;
headless: boolean;
dev: boolean;
}> | null;
}, HTMLDivElement>;

export declare interface EngineComponent {
    prev(): void;
    next(): void;
    goto(pos: Position): void;
    zoomIn(): void;
    zoomOut(): void;
    zoomReset(): void;
    zoomTo(zoom: number): void;
}

/**
 * 文件元信息
 */
export declare interface FileMetas {
    id: string;
    name: string;
    type: FileType;
    page?: number;
    thumb?: string;
    html?: {
        url: string;
        iv?: string;
        encryptKey?: string;
    };
    image?: {
        imageUrlPrefix: string;
        urls: string[];
        iv?: string;
        encryptKey?: string;
    };
    animation?: {
        infoUrl: string;
        pageUrlPrefix: string;
        resourceUri: string;
        encryptKey?: string;
        iv?: string;
        /**
         * 子资源 （例如 PPT 中内嵌的视频）
         */
        subs?: Record<string, unknown>;
    };
}

/**
 * 文件源
 */
export declare interface FileSource {
    /**
     * 文件元信息
     */
    metas?: FileMetas;
    /**
     * 文件 Token
     */
    token?: string;
}

/**
 * 文件类型
 *  * Word: Word 文档
 *  * PDF: PDF 文档
 *  * Presentation: 演示文稿（幻灯片）
 *  * Unknown: 未知
 */
export declare type FileType = "document" | "ppt" | "unknown";

/**
 * 分页对象
 */
export declare interface Pagination {
    /**
     * 总页数
     */
    total: number;
    /**
     * 当前页数
     */
    current: number;
    /**
     * 当前页的第 N 个动画 (仅 PPT 动画版有效)
     */
    step?: number;
}

/**
 * 播放器事件
 */
export declare interface PlayerEvents {
    /**
     * 已准备好
     */
    ready: undefined;
    /**
     * 页码更新
     */
    pageUpdate: Position;
    /**
     * 分页变更
     */
    paginationChange: Pagination;
    /**
     * 开始播放事件，打开课件加载完成后触发
     */
    play: PlayEvent;
}

/**
 * 播放器初始化参数
 */
export declare interface PlayerOptions {
    /**
     * 引擎基础 URL
     *
     * 用于按需载入引擎的脚本、WASM、Iframe等。
     */
    engineBaseUrl: string;
    /**
     * 图文版文档播放引擎 Iframe 地址
     *
     * (用于开发时设置)
     */
    imageEngineIframeUrl: string;
    /**
     * 动画版演示文稿播放引擎 Iframe 地址
     */
    presentationAnimationEngineIframeUrl: string;
    /**
     * 暗黑风格
     */
    dark: boolean;
}

/**
 * 播放事件
 */
export declare interface PlayEvent {
    /**
     * 文件名
     */
    name: string;
    /**
     * 开始播放的分页对象
     */
    pagination: Pagination;
}

/**
 * 播放选项
 */
export declare interface PlayOptions {
    /**
     * 播放初始页
     */
    defaultPage: number;
    /**
     * 播放初始动画步骤
     */
    defaultStep: number;
    /**
     * 是否垂直播放
     */
    vertical: boolean;
}

/**
 * 点位
 */
export declare interface Position {
    /**
     * 页码
     */
    page: number;
    /**
     * 第 N 个动画
     */
    step?: number;
}

export declare interface PostmateHandshake extends default_2.ChildAPI {
    model: any;
}

export declare interface RectangleSize {
    width: number;
    height: number;
}

/**
 * 缩略图
 */
export declare interface Thumb {
    /**
     * 页码
     */
    page: number;
    /**
     * URL
     */
    url: string;
}

export { }
