import { Store } from "@knyt/clerk"; import type { ReactiveController, ReactiveControllerHost } from "./ReactiveController.ts"; /** * A controller that manages the state for a host component. * * @remarks * * This is hybrid class that extends `Store` and implements `ReactiveController`, * allowing it to manage state and trigger updates on the host component. * * This type of controller is useful for simple cases of needing to coordinate state between * a host and a store in a reactive way. * * However, more complex cases should use a `Store` and a `ReactiveController` separately. * * An instance of the controller should be added to a host upon construction so that it can be connected and disconnected * from the host's lifecycle. However, the controller instance may be added and removed from the host at any time. * In the case that the controller is added after the host is connected, the `hostConnected` lifecycle method should be called manually. * * @see ObservableSubscriptionController For an alternative controller that subscribes to a store and requests an update when the store changes. * * @deprecated Use a `Store` and a `ReactiveController` separately */ export declare abstract class ReactiveStateController extends Store implements ReactiveController { #private; protected readonly host: H; protected isHostConnected: boolean; /** @public */ constructor(host: H, initialState: S); /** * @see ReactiveController * @public */ hostConnected(): void; /** * @see ReactiveController * @public */ hostDisconnected(): void; } //# sourceMappingURL=ReactiveStateController.d.ts.map