import type { UIType, VideoPlaybackRate, VideoQualityForRender, VideoQualityUI, VideoSubtitle } from '../../../types';
import type { IAudioStream, PlaybackRate, VideoQuality } from '@vkontakte/videoplayer-core';
import type { QualitySettingsAppliesTo } from '../../../utils/userSettings';
import type { TmpComponentType } from 'packages/ui/src/types/tmp';
export declare enum SharedSubMenuItemId {
    QUALITY_OTHER = "QUALITY_OTHER",
    QUALITY_AUTO = "QUALITY_AUTO",
    QUALITY_APPLIENCE = "QUALITY_APPLIENCE",
    QUALITY_HIGH = "QUALITY_HIGH",
    QUALITY_TRAFFIC_SAVING = "QUALITY_TRAFFIC_SAVING"
}
export declare enum SubMenuId {
    PLAYBACK_RATE_SUB_MENU = "PLAYBACK_RATE_SUB_MENU",
    QUALITY_DETAILS = "QUALITY_DETAILS",
    QUALITY = "QUALITY",
    QUALITY_APPLIENCE = "QUALITY_APPLIENCE",
    AUDIO_LANGUAGES = "AUDIO_LANGUAGES",
    SUBTITLES = "SUBTITLES"
}
export declare enum RootMenuId {
    QUALITY_SETTINGS = "QUALITY_SETTINGS",
    TRAFFIC_SAVING_SWITCH = "TRAFFIC_SAVING_SWITCH",
    AUDIO_LANGUAGES = "AUDIO_LANGUAGES",
    PLAYBACK_RATE = "PLAYBACK_RATE",
    SUBTITLES = "SUBTITLES",
    DOWNLOAD = "DOWNLOAD",
    SHOW_SUPPORT = "SHOW_SUPPORT",
    COPY_DATA = "COPY_DATA",
    SAVE_TRACE_INFO = "SAVE_TRACE_INFO",
    DEBUG_INFO = "DEBUG_INFO"
}
export type Context = {
    closeSettingsMenu: () => void;
    isMobile: boolean;
    /**
     * Скорость.
     */
    availablePlaybackRates: VideoPlaybackRate[];
    selectPlaybackRate: (playbackRate: PlaybackRate) => void;
    /**
     * Качество.
     */
    selectQuality: (quality: VideoQualityUI, appliesTo: QualitySettingsAppliesTo) => void;
    isAutoQualityEnabled: boolean;
    isAutoQualityAvailable: boolean;
    highQualityEnabled: boolean;
    toggleHighQuality: (value: boolean, appliesTo: QualitySettingsAppliesTo) => void;
    trafficSavingEnabled: boolean;
    toggleTrafficSaving: (value: boolean, appliesTo: QualitySettingsAppliesTo) => void;
    currentQuality: VideoQuality;
    availableQualities: VideoQualityForRender[];
    /**
     * Звуковые дорожки.
     */
    availableAudioStreams: IAudioStream[];
    selectAudioLanguage: (stream: IAudioStream) => void;
    currentAudioStream: IAudioStream | undefined;
    /**
     * Субтитры
     */
    availableSubtitlesList: VideoSubtitle[];
    selectSubtitle: (subtitle: VideoSubtitle) => void;
};
export type SubMenuData = (context: Context) => {
    title: string;
    closeSettingsMenu?: () => void;
    items: SubMenuItem[];
    id: SubMenuId;
    minWidth?: number;
};
export type SubMenuItem = SubMenuItemOpenSubMenu | SubMenuItemSelect;
type BaseSubMenuItem<U = any> = {
    selected?: boolean;
    valueComponent?: TmpComponentType;
    valueComponentParams?: {
        [key: string]: U;
    };
    bottomBordered?: boolean;
    label?: string;
    sublabel?: string;
    ariaLabel?: string;
};
export type SubMenuItemOpenSubMenu = {
    type: SubMenuItemType.OPEN_SUB_MENU;
    children: SubMenuId;
    id: SharedSubMenuItemId;
} & BaseSubMenuItem;
export type SubMenuItemSelect<T = any> = {
    type: SubMenuItemType.SELECT_VALUE;
    value: T;
    selectItem: (value: T) => void;
} & BaseSubMenuItem;
interface BaseMenuItem<Id> {
    id: Id;
    weight: number;
    ariaLabel?: string;
    label: string;
}
interface BaseSettingsMenuItem extends BaseMenuItem<RootMenuId> {
    icon: TmpComponentType;
    isHiddenFor?: UIType[];
}
export declare enum MenuItemType {
    OPEN_SUB_MENU = "OPEN_SUB_MENU",
    CLICK = "CLICK",
    SWITCH = "SWITCH"
}
export declare enum SubMenuItemType {
    OPEN_SUB_MENU = "OPEN_SUB_MENU",
    SELECT_VALUE = "SELECT_VALUE"
}
export interface OpenSubMenuSettingsMenuItem extends BaseSettingsMenuItem {
    type: MenuItemType.OPEN_SUB_MENU;
    value: string;
    valueComponent?: TmpComponentType;
    children: SubMenuId;
}
export interface ClickSettingsMenuItem extends BaseSettingsMenuItem {
    type: MenuItemType.CLICK;
    onClick: () => void;
}
export interface SwitchSettingsMenuItem extends BaseSettingsMenuItem {
    type: MenuItemType.SWITCH;
    onClick: (enabled: boolean) => void;
    enabled: boolean;
    tooltipText?: string;
    maxTooltipWidth?: number;
}
export type AdditionalSwitchSettingsMenuItem = Omit<SwitchSettingsMenuItem, 'icon' | 'onClick'> & {
    icon: string;
    onChangeEnabled: (enabled: boolean) => void;
};
export type AdditionalClickSettingsMenuItem = Omit<SwitchSettingsMenuItem, 'icon'> & {
    icon: string;
};
export type SettingsMenuItem = OpenSubMenuSettingsMenuItem | ClickSettingsMenuItem | SwitchSettingsMenuItem;
export type AdditionalSettingsMenuItem = AdditionalSwitchSettingsMenuItem | AdditionalClickSettingsMenuItem;
export interface ContextMenuItem extends BaseMenuItem<string> {
    onClick: () => void;
}
export type AdditionalContextMenuItem = ContextMenuItem;
export type MenuRefs = {
    [key: string]: HTMLUListElement;
};
export {};
