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-settings",
    QUALITY_AUTO = "quality-auto",
    QUALITY_APPLIANCE = "quality-appliance-settings",
    QUALITY_HIGH = "quality-high",
    QUALITY_TRAFFIC_SAVING = "quality-traffic-saving"
}
export declare enum SubMenuId {
    PLAYBACK_RATE = "playback-rate",
    QUALITY_SETTINGS = "quality-settings",
    QUALITY_OTHER_SETTINGS = "quality-other-settings",
    QUALITY_APPLIANCE = "quality-appliance",
    AUDIO_TRACKS = "audio-tracks",
    SUBTITLES = "subtitles"
}
export declare enum RootMenuId {
    QUALITY_SETTINGS = "quality-settings",
    TRAFFIC_SAVING_SWITCH = "traffic-saving-switch",
    AUDIO_TRACKS = "audio-tracks-settings",
    PLAYBACK_RATE = "playback-rate-settings",
    SUBTITLES = "subtitles-settings",
    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;
    dataTestid?: 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;
    dataValue?: T | keyof T;
    selectItem: (value: T) => void;
} & BaseSubMenuItem;
interface BaseMenuItem<Id> {
    id: Id;
    weight: number;
    ariaLabel?: string;
    label: string;
}
export type IconPropsType = {
    [key: string]: any;
};
interface BaseSettingsMenuItem extends BaseMenuItem<RootMenuId> {
    icon: TmpComponentType;
    iconProps?: IconPropsType;
    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 {};
