import type { ContextHaving } from '../../../../../framework-types/execution-context/Types';
import type { EmptyObject } from '../../../../Types';
import type { SourceStateAtom } from '../../../source/atoms/SourceStateAtom';
import type { SourceExportNames } from '../../../source/Types';
import type { TimeRange } from '../../../stream-data-structure/track/TrackAtom';
import type { ContextWithState } from '../../../Types';
import type { CoreExportNames } from '../../Types';
import type { Transient } from '../../utils/StateUtils';
import type { CoreUtils } from '../../utils/Types';
import type { StateAtom } from '../Types';
export type TimelineContext = ContextHaving<{
    [CoreExportNames.Utils]: CoreUtils;
    [SourceExportNames.SourceState]: SourceStateAtom;
}, EmptyObject, ContextWithState>;
export type TimelineEntry = {
    start: number;
    end: number;
};
export type Timeline<Entry extends TimelineEntry> = {
    added: Transient<Entry[]>;
    removed: Transient<Entry[]>;
    [Symbol.iterator](): Iterator<Entry>;
    get(time: number): Entry[];
    get(range: TimeRange): Entry[];
    entries(): readonly Entry[];
};
export type TimelineAtom<Entry extends TimelineEntry> = StateAtom<Timeline<Entry>, {
    add: (data: Timeline<Entry>, ...toAdd: Entry[]) => boolean;
    remove: (data: Timeline<Entry>, ...toRemove: Entry[]) => boolean;
    clear: (data: Timeline<Entry>) => boolean;
}>;
