import type { EmptyObject } from '../../../../framework-types/BaseTypes'; import type { ContextHaving } from '../../../../framework-types/execution-context/Types'; 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 { Transient } from '../../core/utils/StateUtils'; import type { CoreUtils } from '../../core/utils/Types'; import type { ContextWithState } from '../../Types'; import type { MediaElementReadyState } from './Types'; type DetachedVideoElementState = { error: PrimitiveAtom; ended: PrimitiveAtom; paused: PrimitiveAtom; playing: PrimitiveAtom; seeking: PrimitiveAtom; waiting: PrimitiveAtom; muted: PrimitiveAtom; volume: PrimitiveAtom; playbackRate: PrimitiveAtom; currentTime: PrimitiveAtom; duration: PrimitiveAtom; readyState: PrimitiveAtom; playEventTriggered: PrimitiveAtom; pauseEventTriggered: PrimitiveAtom; onPlayRejected: Transient; }; type AttachedVideoElementState = { error: PrimitiveAtom; paused: PrimitiveAtom; ended: PrimitiveAtom; playing: PrimitiveAtom; seeking: PrimitiveAtom; waiting: PrimitiveAtom; muted: PrimitiveAtom; volume: PrimitiveAtom; playbackRate: PrimitiveAtom; currentTime: PrimitiveAtom; duration: PrimitiveAtom; readyState: PrimitiveAtom; playEventTriggered: PrimitiveAtom; pauseEventTriggered: PrimitiveAtom; onPlayRejected: Transient; }; type VideoElementState = DetachedVideoElementState | AttachedVideoElementState; type Modifiers = { detach: (state: VideoElementState) => boolean; }; type DetachedVideoElementStateAtom = StateAtom; type AttachedVideoElementStateAtom = StateAtom; export type VideoElementStateAtom = DetachedVideoElementStateAtom | AttachedVideoElementStateAtom; type ContextT = ContextHaving<{ [CoreExportNames.CoreStateAtoms]: CoreStateAtoms; [CoreExportNames.Utils]: CoreUtils; }, EmptyObject, ContextWithState>; export declare function createVideoElementStateAtom(context: ContextT): VideoElementStateAtom; export declare function isAttachedVideoElementStateAtom(state: VideoElementStateAtom): state is AttachedVideoElementStateAtom; export {};