import type { ContextHaving } from '../../../../framework-types/execution-context/Types';
import type { EmptyObject, PartialRequired } from '../../../Types';
import type { Constants } from '../../core/Constants';
import type { ArrayAtom } from '../../core/state/ArrayStateAtom';
import type { PrimitiveAtom } from '../../core/state/PrimitiveAtom';
import type { StateAtom } from '../../core/state/Types';
import type { CoreStateAtoms } from '../../core/Types';
import { CoreExportNames } from '../../core/Types';
import type { CoreUtils } from '../../core/utils/Types';
import type { ContextWithState } from '../../Types';
import type { ContainerFormat } from '../segment/SegmentDataAtom';
import type { AudioTrackAtom, MediaTrackAtom, SubtitleTrackAtom, TimeRange, TrackAtom, VideoTrackAtom } from '../track/TrackAtom';
type ExtendedContext = ContextHaving<{
    [CoreExportNames.CoreStateAtoms]: CoreStateAtoms;
    [CoreExportNames.Constants]: Constants;
    [CoreExportNames.Utils]: CoreUtils;
}, EmptyObject, ContextWithState>;
type BaseSelectionGroup = {
    tracks: ArrayAtom<TrackAtom>;
    sequenceNumber: number;
    timeRange: TimeRange;
    mediaId: string;
};
type MediaSelectionGroup = Omit<BaseSelectionGroup, 'tracks'> & {
    tracks: ArrayAtom<MediaTrackAtom>;
    container: PrimitiveAtom<undefined | ContainerFormat>;
};
type VideoSelectionGroup = Omit<MediaSelectionGroup, 'tracks'> & {
    tracks: ArrayAtom<VideoTrackAtom>;
};
type LanguageSelectionGroup = {
    language: string;
};
type AudioSelectionGroup = Omit<MediaSelectionGroup & LanguageSelectionGroup, 'tracks'> & {
    tracks: ArrayAtom<AudioTrackAtom>;
};
type SubtitleSelectionGroup = Omit<LanguageSelectionGroup & BaseSelectionGroup, 'tracks'> & {
    tracks: ArrayAtom<SubtitleTrackAtom>;
};
type UnknownSelectionGroup = BaseSelectionGroup;
export type UnknownSelectionGroupAtom = StateAtom<UnknownSelectionGroup, typeof UnknownSelectionGroupModifiers>;
export type AudioSelectionGroupAtom = StateAtom<AudioSelectionGroup, ReturnType<typeof getAudioSelectionGroupModifiers>>;
export type VideoSelectionGroupAtom = StateAtom<VideoSelectionGroup, ReturnType<typeof getVideoSelectionGroupModifiers>>;
export type SubtitleSelectionGroupAtom = StateAtom<SubtitleSelectionGroup, typeof SubtitleSelectionGroupModifiers>;
export type MediaSelectionGroupAtom = Omit<AudioSelectionGroupAtom | VideoSelectionGroupAtom, 'tracks'> & {
    tracks: ArrayAtom<AudioTrackAtom | VideoTrackAtom>;
};
export type SelectionGroupAtom = Omit<UnknownSelectionGroupAtom | AudioSelectionGroupAtom | VideoSelectionGroupAtom | SubtitleSelectionGroupAtom, 'tracks'> & {
    tracks: ArrayAtom<TrackAtom>;
};
type SelectionGroup = AudioSelectionGroup | VideoSelectionGroup | SubtitleSelectionGroup | UnknownSelectionGroup;
declare function getVideoSelectionGroupModifiers(): {
    setSequenceNumber: (selectionGroup: SelectionGroup, sequenceNumber: number) => boolean;
};
export declare const createVideoSelectionGroupAtom: (context: ExtendedContext, initialValue: PartialRequired<VideoSelectionGroup, 'tracks'>) => VideoSelectionGroupAtom;
declare function getAudioSelectionGroupModifiers(): {
    setLanguage: (selectionGroup: AudioSelectionGroup | SubtitleSelectionGroup, language: string) => boolean;
    setSequenceNumber: (selectionGroup: SelectionGroup, sequenceNumber: number) => boolean;
};
export declare const createAudioSelectionGroupAtom: (context: ExtendedContext, initialValue: PartialRequired<AudioSelectionGroup, 'tracks' | 'language'>) => AudioSelectionGroupAtom;
declare const SubtitleSelectionGroupModifiers: {
    setSequenceNumber: (selectionGroup: SelectionGroup, sequenceNumber: number) => boolean;
    setLanguage: (selectionGroup: AudioSelectionGroup | SubtitleSelectionGroup, language: string) => boolean;
};
export declare const createSubtitleSelectionGroupAtom: (context: ExtendedContext, initialValue: PartialRequired<SubtitleSelectionGroup, 'tracks' | 'language'>, label: string) => SubtitleSelectionGroupAtom;
declare const UnknownSelectionGroupModifiers: {
    setSequenceNumber: (selectionGroup: SelectionGroup, sequenceNumber: number) => boolean;
};
export declare const createUnknownSelectionGroupAtom: (context: ExtendedContext, initialValue: PartialRequired<UnknownSelectionGroup, 'tracks'>) => UnknownSelectionGroupAtom;
export {};
