import { ReadableStore, WritableStore } from '@vidstack/foundation'; import type { ReactiveControllerHost } from 'lit'; import type { MediaContext } from './MediaContext'; export declare type WritableMediaStoreRecord = { [Prop in keyof MediaContext]: WritableStore; }; export declare type ReadableMediaStoreRecord = { [Prop in keyof MediaContext]: ReadableStore; }; export declare function createMediaStore(): WritableMediaStoreRecord; export declare const mediaStoreContext: import("@vidstack/foundation").Context; /** * Helper function to simplify subscribing to a media store for the life of the given `host` * element, meaning when it's disconnected from the DOM, the subscription is destroyed. * * @example * ```ts * import { LitElement } from 'lit'; * import { mediaStoreSubscription } from '@vidstack/player'; * * class MyElement extends LitElement { * constructor() { * super(); * mediaStoreSubscription(this, 'paused', ($paused) => { * // ... * }); * } * } * ``` */ export declare function mediaStoreSubscription(host: ReactiveControllerHost & EventTarget, property: T, onChange: (value: MediaContext[T]) => void): void; //# sourceMappingURL=store.d.ts.map