import { type Observable, type Reference } from "@knyt/artisan"; import type { BasicEvent } from "./BasicEvent.ts"; import type { Effect } from "./Effect.ts"; import type { EventListenableObserver } from "./EventListenableObserver.ts"; import { EventListenerController } from "./EventListenerController.ts"; import type { ReactiveControllerHost } from "./ReactiveController.ts"; import type { InferTypedEventFromName } from "./types.ts"; /** * A factory and manger for event listener controllers. * * @alpha */ export declare class EventListenerManager implements Effect { #private; constructor(host: ReactiveControllerHost, target: Reference.Maybe); /** * Creates a new event listener controller for the given event name * and listener, and adds it to the manager.\ * * @returns An instance of `EventListenerController` that can be used to manage the event listener. */ create(eventName: K, listener: EventListenableObserver.Listener, options?: AddEventListenerOptions): EventListenerController; /** * Adds a new event listener controller to the manager * for the given event name and listener. * * @returns The current instance of `EventListenerManager` for chaining. */ add(eventName: K, listener: EventListenableObserver.Listener, options?: AddEventListenerOptions): this; /** * Creates an observable that emits events of the given type * from the target element when the event is fired. * * @returns An observable that emits events of the specified type. */ observe(eventName: K, options?: AddEventListenerOptions): Observable>; /** * Adds all event listeners to the target element. */ setup(): void; /** * Removes all event listeners from the target element. */ teardown(): void; /** * Disposes of all event listeners from the target element */ dispose(): void; } //# sourceMappingURL=EventListenerManager.d.ts.map