import { RecursivePartial, InterfaceLanguage, Milliseconds, ExactVideoQuality, ErrorCategory, QualityLimits } from '@vkontakte/videoplayer-shared';
export { InterfaceLanguage, Milliseconds, QualityLimits, VKNumericLanguage, loadVKLangPack } from '@vkontakte/videoplayer-shared';
import { IOptionalTuningConfig, VideoFormat, PlaybackState, VideoQuality, ISources, IExternalTextTrack, PlaybackRate } from '@vkontakte/videoplayer-core';
export { IDashSource, ISources, RawSource, URLSource, URLSourceWithSeek, VideoFormat, VideoQuality } from '@vkontakte/videoplayer-core';
import { IOptionalConfig } from '@vkontakte/videoplayer-statistics';
import { Manifest, VideoInfo } from '@vkontakte/videoplayer-interactive';

type ForceOrRelay = boolean | undefined;
declare enum LogoType {
    VK = "vk",
    VK_VIDEO = "vk_video"
}
interface IUIConfig {
    isMobile: ForceOrRelay;
    isSmoothVideoRotate: boolean;
    showSupport: boolean;
    supportLink: string;
    showLogo: ForceOrRelay;
    logoLink: string;
    logoType: LogoType;
    addTimeToLogoLink: boolean;
    defaultLanguage: InterfaceLanguage;
    downloadVKLanguages: boolean;
    updateBuiltinLanguages: boolean;
    ads: {
        enable: ForceOrRelay;
        loadTimeout: Milliseconds;
        initTimeout: Milliseconds;
        slot?: number;
        preview?: number;
    };
    volumeDefault: number;
    volumeMinRestore: number;
    loaderDelay: Milliseconds;
    allowChangingFullscreenTarget: boolean;
    minSubtitlesFontSize: number;
    autoSubtitlesTimeout: Milliseconds;
    trafficSavingLimit: ExactVideoQuality;
    episodeMinWidthPc: number;
    controls: {
        hideTimeout: Milliseconds;
        hideTimeoutMobile: Milliseconds;
        hideTimeoutInitial: Milliseconds;
        hideTimeoutFullscreen: Milliseconds;
        hideTimeoutCursor: Milliseconds;
        hideTimeoutTooltips: Milliseconds;
        collapseMobileUnmute: Milliseconds;
        hide360IconTimeout: Milliseconds;
        volumeBarTimeout: Milliseconds;
        hideHotKeyHelpers: Milliseconds;
        playbackRateMin: number;
        playbackRateMax: number;
        playbackRateStep: number;
        seekStepKeyboard: Milliseconds;
        seekStepMobile: Milliseconds;
        seekStepFrame: Milliseconds;
        volumeStepKeyboard: number;
        volumeStepWheel: number;
    };
    hideThumbTimerAfterTouch: boolean;
    sentry: {
        dsn: string;
        sampleRate: number;
        whiteErrorCategoryList: ErrorCategory[];
        blackErrorCategoryList: ErrorCategory[];
        whiteErrorIdList: string[];
        blackErrorIdList: string[];
    };
    features: {
        autoplay: boolean;
        statistics: boolean;
        sentry: boolean;
        preload: boolean;
        subtitles: boolean;
        timelinePreview: boolean;
        episodes: boolean;
        fullscreen: boolean;
        mediaSession: boolean;
        annotations: boolean;
        download: boolean;
        pip: boolean;
        dpip: boolean;
        liveRewind: boolean;
        playbackRate: boolean;
        trafficSaving: boolean;
        episodesClustering: boolean;
        copyVideoLink: boolean;
        videoRotate: boolean;
        interactiveGraph: boolean;
        seekToInteractive: boolean;
        interactiveLastFrame: boolean;
        interactiveTextPermanent: boolean;
        interactiveHideTime: boolean;
        interactivePlayPrevChapter: boolean;
        thumbTimer: boolean;
        hotKeyMapModal: boolean;
        hotKeyHelpers: boolean;
        saveDebugInfoToFile: boolean;
        additionalButtons: boolean;
        contextMenuButton: boolean;
    };
    interactive: {
        historyMaxLength: number;
    };
}
interface ISDKConfig {
    ui: RecursivePartial<IUIConfig>;
    core: IOptionalTuningConfig;
    statistics: IOptionalConfig;
}

type Key = 'auto_quality_invariant' | 'auto_quality' | 'menu_quality' | 'menu_playback_rate' | 'menu_traffic_saving' | 'menu_report' | 'menu_pip' | 'menu_copy_video_link' | 'menu_copy_video_link_with_timestamp' | 'menu_video_rotate' | 'menu_chromecast' | 'menu_copy_debug' | 'menu_save_debug' | 'menu_debug_overlay' | 'pip_dummy_title' | 'submenu_traffic_saving' | 'submenu_quality' | 'submenu_playback_rate' | 'submenu_settings' | 'auto_quality_option' | 'mobile_unmute' | 'playing_ads' | 'skip_ads_now' | 'skip_ads_after' | 'visit_advertiser' | 'aria_timeline' | 'aria_open_settings' | 'aria_timeline_value' | 'doubletap_seek_step' | 'playback_rate_1' | 'playback_rate' | 'video360' | 'subtitles_caption' | 'subtitles_auto' | 'subtitles_off' | 'subtitles_auto_caption' | 'subtitles_turn_on' | 'subtitles_turn_off' | 'traffic_saving_off' | 'traffic_saving_on' | 'traffic_saving_disable' | 'traffic_saving_enable' | 'traffic_saving_helper_text' | 'tooltip_previous' | 'tooltip_restart' | 'tooltip_play' | 'tooltip_pause' | 'tooltip_next' | 'tooltip_button_disabled' | 'tooltip_interactive_go_back' | 'tooltip_interactive_go_back_disabled' | 'tooltip_interactive_go_back_disabled_first' | 'tooltip_interactive_go_back_disabled_limit' | 'tooltip_chapter_without_interactive' | 'tooltip_interactive_of_chapter_completed' | 'tooltip_interactive_seek' | 'tooltip_interactive_graph_off' | 'tooltip_interactive_graph_on' | 'tooltip_live' | 'tooltip_episodes' | 'tooltip_volume' | 'tooltip_volume_muted' | 'tooltip_settings_on' | 'tooltip_subtitles_off' | 'tooltip_settings_off' | 'tooltip_subtitles_on' | 'tooltip_fullscreen_off' | 'tooltip_fullscreen_on' | 'tooltip_chromecast_off' | 'tooltip_chromecast_on' | 'tooltip_episode_finished' | 'tooltip_episode_unfinished' | 'tooltip_disabled_when_interactive' | 'tooltip_disabled_when_graph_on' | 'tooltip_vk_logo' | 'tooltip_vk_video_logo' | 'download_video_caption' | 'hotkey_helper_current_volume' | 'hotkey_map_modal_title' | 'hotkey_map_modal_close_btn_text' | 'hotkey_map_group_title_common' | 'hotkey_map_group_title_playback' | 'hotkey_map_group_title_subtitles' | 'hotkey_map_group_title_episodes' | 'hotkey_map_item_mute_description' | 'hotkey_map_item_mute_value' | 'hotkey_map_item_volume_down_description' | 'hotkey_map_item_volume_down_value' | 'hotkey_map_item_volume_up_description' | 'hotkey_map_item_volume_up_value' | 'hotkey_map_item_pip_description' | 'hotkey_map_item_pip_value' | 'hotkey_map_item_full_screen_description' | 'hotkey_map_item_full_screen_value' | 'hotkey_map_item_show_hotkey_map_description' | 'hotkey_map_item_show_hotkey_map_value' | 'hotkey_map_item_play_toggle_description' | 'hotkey_map_item_play_toggle_value' | 'hotkey_map_item_seek_backward_description' | 'hotkey_map_item_seek_backward_value' | 'hotkey_map_item_seek_forward_description' | 'hotkey_map_item_seek_forward_value' | 'hotkey_map_item_fast_seek_backward_description' | 'hotkey_map_item_fast_seek_backward_value' | 'hotkey_map_item_fast_seek_forward_description' | 'hotkey_map_item_fast_seek_forward_value' | 'hotkey_map_item_rate_down_description' | 'hotkey_map_item_rate_down_value' | 'hotkey_map_item_rate_up_description' | 'hotkey_map_item_rate_up_value' | 'hotkey_map_item_prev_frame_description' | 'hotkey_map_item_prev_frame_value' | 'hotkey_map_item_next_frame_description' | 'hotkey_map_item_next_frame_value' | 'hotkey_map_item_jump_seek_description' | 'hotkey_map_item_jump_seek_value' | 'hotkey_map_item_subtitles_toggle_description' | 'hotkey_map_item_subtitles_toggle_value' | 'hotkey_map_item_prev_episode_description' | 'hotkey_map_item_prev_episode_pc_value' | 'hotkey_map_item_prev_episode_mac_value' | 'hotkey_map_item_next_episode_description' | 'hotkey_map_item_next_episode_pc_value' | 'hotkey_map_item_next_episode_mac_value' | 'waiting_live_day_value' | 'waiting_live_hour_value' | 'waiting_live_minute_value' | 'waiting_live_second_value' | 'waiting_live_colon' | 'waiting_live_upcoming_title' | 'waiting_live_timer_title' | 'waiting_record_title' | 'aria_label_menu_traffic_saving' | 'aria_label_submenu_traffic_saving_off' | 'aria_label_submenu_traffic_saving_on' | 'aria_label_submenu_back' | 'aria_label_menu_quality' | 'aria_label_menu_rate' | 'aria_label_menu_subtitle' | 'aria_label_menu_download' | 'aria_label_new_tab_alert' | 'aria_label_menu_debug_overlay_enable' | 'aria_label_menu_debug_overlay_disable' | 'aria_label_menu_rotate' | 'aria_label_debug_panel' | 'aria_label_context_menu_open' | 'aria_label_context_menu_close' | 'aria_label_video_player' | 'aria_label_spherical_control';
type LanguagePack = Record<Key, string>;
type LanguageConfig = {
    language: string;
    fallback: InterfaceLanguage;
    pack: LanguagePack;
};

declare enum GridTypes {
    XS = "xs",
    S = "s",
    M = "m",
    L = "l",
    XL = "xl"
}

interface IVKVideoPlayerCallbacks {
    onInited?: () => void;
    onStarted?: () => void;
    onEnded?: () => void;
    onPlay?: () => void;
    onPause?: () => void;
    onVolumeChange?: (volume: number) => void;
    onFullscreenEnter?: () => void;
    onFullscreenExit?: () => void;
    onMute?: () => void;
    onUnmute?: () => void;
    onAudioDisabledHint?: () => void;
    onAudioDoesNotExistHint?: () => void;
    onEpisodeClicked?: (byKeyboard: boolean) => void;
    onEpisodeChanged?: (episode: IVideoEpisode) => void;
    onTimeupdate?: (duration: number, position: number) => void;
    onSeek?: (from: number, to: number) => void;
    onCrashed?: () => void;
    onCurrentFormatChanged?: (currentFormat: VideoFormat | undefined) => void;
    onThroughputEstimationChanged?: (throughputEstimation: number | undefined) => void;
    onVideoBitrateChanged?: (videoBitrate: number | undefined) => void;
    onPlayerPhaseChanged?: (value?: PlayerPhase) => void;
    onPlaybackStateChanged?: (value?: PlaybackState) => void;
    onIsLiveChanged?: (value?: boolean) => void;
    onIsActiveLiveChanged?: (value?: boolean) => void;
    onIsAudioAvailableChanged?: (value?: boolean) => void;
    onCopyVideoLink?: (withTimestamp: boolean, currentTimestamp: number) => string;
    onOpenHotKeyMap?: (mapData: HotKeyMapData) => void;
    onCurrentQualityChanged?: (currentQuality: VideoQuality | undefined) => void;
    onAvailableQualitiesChanged?: (availableQualities: VideoQuality[]) => void;
    onPiPEnter?: () => void;
    onPiPExit?: () => void;
    onLiveTime?: (liveTime: number | undefined) => void;
    onReplayInteractiveVideo?: () => void;
    onInteractiveHistoryChanged?: (chapterIds: string[]) => void;
    onDisabledInteractiveClick?: () => void;
    onPrevVideoClick?: () => boolean;
    onNextVideoClick?: () => boolean;
    onTrafficSavingEnabledChanged?: (isEnabled: boolean) => void;
    onCurrentPlaybackRateChanged?: (rate: number) => void;
    onStalledChanged?: (isStalled: boolean) => void;
    uiInfo?: {
        onControlsVisibleChanged?: (value?: boolean) => void;
        onIsMobileChanged?: (value?: boolean) => void;
        onPrevButtonChanged?: (value?: IControlInfo) => void;
        onPlayButtonChanged?: (value?: IControlInfo) => void;
        onReplayButtonChanged?: (value?: IControlInfo) => void;
        onNextButtonChanged?: (value?: IControlInfo) => void;
        onPlayPrevChapterChanged?: (value?: IControlInfo) => void;
        onSeekToInteractiveButtonChanged?: (value?: IControlInfo) => void;
        onGraphButtonChanged?: (value?: IControlInfo) => void;
        onLiveButtonChanged?: (value?: IControlInfo) => void;
        onTimeUpdateChanged?: (value?: IControlInfo) => void;
        onEpisodesChanged?: (value?: IControlInfo) => void;
        onVolumeChanged?: (value?: IControlInfo) => void;
        onSubtitlesChanged?: (value?: IControlInfo) => void;
        onSettingsChanged?: (value?: IControlInfo) => void;
        onFullscreenChanged?: (value?: IControlInfo) => void;
        onChromecastChanged?: (value?: IControlInfo) => void;
        onPipChanged?: (value?: IControlInfo) => void;
        onVkLogoChanged?: (value?: IControlInfo) => void;
        onPlayerSizeChanged?: (value?: {
            width: number;
            height: number;
        }) => void;
    };
}
type AdsParams = Record<string, unknown>;
interface IVideoEpisode {
    time: number;
    text: string;
    interactive?: boolean;
    completed?: boolean;
}
interface ITimelinePreviewThumbsData {
    countPerImage: number;
    countPerRow: number;
    countTotal: number;
    frameHeight: number;
    frameWidth: number;
    frequency: number;
    isUV: boolean;
    links: string[];
}
interface IVideoLive {
    status: 'started' | 'upcoming' | 'waiting' | 'finished' | 'postlive' | 'failed';
    startTime?: number;
}
interface IVideoDataBase {
    title: string;
    thumbUrl?: string;
    videoLogoUrl?: string;
    unitedVideoId?: number;
    duration: number;
    adsParams?: AdsParams;
    videoEpisodes?: IVideoEpisode[];
    previewThumbsData?: ITimelinePreviewThumbsData;
    isClip?: boolean;
    subtitles?: Array<Omit<IExternalTextTrack, 'type'>>;
}
interface IVideoDataWithSources extends IVideoDataBase {
    sources: ISources;
    live?: never;
}
interface IVideoDataWithLive extends IVideoDataBase {
    live: IVideoLive;
    sources?: never;
}
type IVideoData = IVideoDataWithSources | IVideoDataWithLive;
interface IInteractiveData {
    manifest: string | Manifest;
    initChapterId?: string;
    visitedChapters?: string[];
    videosInfo?: VideoInfo[];
    videoLoader?: (owner_id: string, video_id: string) => Promise<IVKVideoPlayerConfig>;
    historyApi: {
        get: (videoId: string) => Promise<number[]>;
        save: (videoId: string, videoIds: number[]) => Promise<void>;
    };
    projectInfo?: {
        pid: string;
        title: string;
        videoId: string;
        variantPayloadType: string;
    };
}
interface AdditionalButton {
    iconUrl: string;
    onClick?: (event?: MouseEvent) => void;
    tooltip?: string;
    ariaLabel?: string;
    testId?: string;
    hideOnDesktopGridTypes?: GridTypes[];
    hideOnMobile?: boolean;
}
interface IVKVideoPlayerConfig {
    videos: IVideoData[];
    interactiveData?: IInteractiveData;
    albumId?: string;
    statPlace?: 'embed' | 'direct' | string;
    statAuthToken?: string;
    statUserSalt?: string;
    statTrackCode?: string;
    refreshStatAuthToken?: () => Promise<string | undefined>;
    preload?: boolean;
    autoplay?: boolean;
    repeat?: boolean;
    volume?: number;
    muted?: boolean;
    fromTime?: number;
    canRewindLive?: boolean;
    supportLink?: string;
    showAds?: boolean;
    adsSlotId?: number;
    adsParams?: AdsParams;
    adsPreviewParam?: number;
    interfaceLanguage?: InterfaceLanguage | string;
    logoClickable?: boolean;
    logoHidden?: boolean;
    isMobile?: boolean;
    /** @deprecated */
    isMediaSessionEnabled?: boolean;
    /** @deprecated */
    isPictureInPictureEnabled?: boolean;
    isAudioDisabled?: boolean;
    isLiveCatchUpMode?: boolean;
    canDownload?: boolean;
    fullScreenTarget?: HTMLElement;
    failoverHosts?: string[];
    showThumbTimer?: boolean;
    is3DVideo?: boolean;
    callbacks?: IVKVideoPlayerCallbacks;
    additionalButtons?: AdditionalButton[];
}
interface IControlInfo {
    /** @deprecated Используйте новое поле left */
    positionStartX: number;
    /** @deprecated Используйте новое поле right */
    positionEndX: number;
    left: number;
    right: number;
    top: number;
    bottom: number;
    isDisplayed: boolean;
}
declare const enum PlayerPhase {
    Thumb = "thumb",
    Video = "video",
    Ads = "ads",
    Crashed = "crashed",
    WaitingLive = "waitingLive",
    WaitingRecord = "waitingRecord"
}
interface IAnnotationsApi {
    /** @deprecated Больше не используется. Контейнер теперь определяется самостоятельно */
    registryRootContainer: (container: HTMLElement) => void;
    /** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
    addLayer: (layerName: string) => HTMLElement | never;
    /** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
    getLayer: (layerName: string) => HTMLElement | undefined;
    /** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
    removeLayer: (layerName: string) => void;
    /** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
    clearLayer: (layerName: string) => void;
    /** @deprecated Метод больше не является публичным */
    detach: () => void;
    /** @deprecated Больше нет необходимости переназначать контейнер для аннотаций в ходе работы плеера */
    reattach: () => void;
    add: (annotationName: string, annotation: HTMLElement) => void | never;
    get: (annotationName: string) => HTMLElement | never;
    remove: (annotationName: string) => void | never;
    clear: () => void;
    destroy: () => void;
}
interface HotKeyMapItem {
    description: string;
    value: string;
}
interface HotKeyMapGroup {
    title: string;
    items: HotKeyMapItem[];
}
interface HotKeyMapData {
    title: string;
    groups: HotKeyMapGroup[];
    closeBtnText: string;
}

declare class AnnotationsApi implements IAnnotationsApi {
    private rootAnnotationsContainer;
    private annotations;
    private subscriptions;
    private mutationObserver;
    private playerSize;
    constructor(container: HTMLElement);
    add(annotationName: string, annotation: HTMLElement): void | never;
    get(annotationName: string): HTMLElement | never;
    remove(annotationName: string): void | never;
    clear(): void;
    destroy(): void;
    private isElementExceedsBoundaries;
    /** @deprecated Больше не используется. Контейнер теперь определяется самостоятельно */
    registryRootContainer(container: HTMLElement): void;
    /** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
    addLayer(layerName: string): HTMLElement | never;
    /** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
    getLayer(layerName: string): HTMLElement | undefined;
    /** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
    removeLayer(layerName: string): void;
    /** @deprecated Логики со слоями больше нет. Теперь все аннотации добавляются на единый общий слой */
    clearLayer(layerName: string): void;
    /** @deprecated Метод больше не является публичным */
    detach(): void;
    /** @deprecated Больше нет необходимости переназначать контейнер для аннотаций в ходе работы плеера */
    reattach(): void;
}

declare class VKVideoPlayer extends HTMLElement {
    private svelteStubComponent?;
    private svelteRootComponent?;
    private store?;
    private microStoresRoot?;
    private statistics;
    private sentry;
    private _shadowRoot;
    private playerContainer;
    private rootContainer;
    private uiConfig;
    private coreConfig;
    private interactiveController;
    private interactiveContainer;
    private graphMadePause;
    private currentPlayingVideoIndex;
    private needToRepeatPlaylist;
    private videoConfig;
    private pictureInPictureApi;
    private mediaSessionApi;
    private unsubscribePlayerPhaseSubscription;
    private readonly logger;
    private readonly log;
    private readonly subscription;
    annotationsApi: AnnotationsApi | undefined;
    private createPlayerTimeout;
    private prevIsid;
    private isInited;
    constructor();
    private connectedCallback;
    private disconnectedCallback;
    private initPlayerRootContainers;
    private needToShowNextPrevButtons;
    private isNextButtonActive;
    private isPrevButtonActive;
    private isControlDisabled;
    private getNextVideoInfo;
    private createPlayer;
    private addPlayerInfoSubscriptions;
    private playNextVideo;
    private playPrevVideo;
    private repeatPlaylist;
    private createPlayerWithCurrentVideo;
    private playPrevChapter;
    private seekToInteractive;
    private toggleGraph;
    private initInteractives;
    private initInteractivesStatistics;
    initPlayer(videoConfig: IVKVideoPlayerConfig, sdkConfig?: Partial<ISDKConfig>): void;
    private isOneVideoPlaylist;
    /**
     * Обновление плейлиста. Будут перезаписаны все видео после текущего
     */
    updateNextVideos(videos: IVideoData[]): void;
    private initMediaSession;
    private setupMediaSessionForVideo;
    private setupMediaSessionForAds;
    play(): void;
    pause(): void;
    stop(): void;
    setMuted(muted: boolean): void;
    setVolume(volume: number): void;
    setRepeat(repeat: boolean): void;
    seekTime(time: number): void;
    seekEpisodeStartTime(time: number): void;
    returnFocusToEpisodes(): void;
    setPlaybackRate(playbackRate: PlaybackRate): void;
    setAutoQualityLimits(limits: QualityLimits): void;
    addLanguage(config: LanguageConfig): void;
    setLanguage(language: InterfaceLanguage | string): Promise<void>;
    setLiveStart(sources: ISources): void;
    setWaitRecord(): void;
    setLiveEnd(videoData: IVideoData): void;
    getDeviceId(): string | undefined;
    replayInteractiveVideo(): void;
}

declare const VERSION: string;

declare const registerPlayerWebComponent: () => void;

export { AdditionalButton, AdsParams, GridTypes, HotKeyMapData, HotKeyMapGroup, HotKeyMapItem, IControlInfo, IInteractiveData, IVKVideoPlayerCallbacks, IVKVideoPlayerConfig, IVideoData, IVideoLive, LanguageConfig, LanguagePack, VERSION, VKVideoPlayer, registerPlayerWebComponent };
