import { State } from "../../core/state.js"; import { Selector } from "../../core/shallow-equal.js"; import { ReactiveController, ReactiveControllerHost } from "@videojs/element"; //#region src/html/controllers/snapshot-controller.d.ts type SnapshotControllerHost = ReactiveControllerHost & HTMLElement; /** * Subscribe to a `State` container with optional selector. * * Without selector: returns full state, re-renders on any state change. * With selector: returns selected slice, re-renders only when the slice changes (shallowEqual). * * @example * ```ts * #state = new SnapshotController(this, sliderState, (s) => s.value); * ``` */ declare class SnapshotController implements ReactiveController { #private; /** * @label Without Selector * @param host - The host element that owns this controller. * @param state - The State container to subscribe to. */ constructor(host: ReactiveControllerHost, state: State); /** * @label With Selector * @param host - The host element that owns this controller. * @param state - The State container to subscribe to. * @param selector - Derives a value from the state. */ constructor(host: ReactiveControllerHost, state: State, selector: Selector); get value(): R; /** Switch to tracking a different state container. */ track(state: State): void; hostConnected(): void; hostDisconnected(): void; } declare namespace SnapshotController { type Host = SnapshotControllerHost; } //#endregion export { SnapshotController, SnapshotControllerHost }; //# sourceMappingURL=snapshot-controller.d.ts.map