import type { EventListenerSubscription, GlobalRouterEvent, IRoutingInfo } from '../model.js'; /** * Dispatches a did change route event. * @template D * @param {HTMLElement} $elem - The element to dispatch the event on. * @param {IRoutingInfo} detail - The routing info to dispatch. */ export declare function dispatchRouteChangeEvent($elem: HTMLElement, detail: IRoutingInfo): void; /** * Dispatches an event on the window object. * @template D * @param {GlobalRouterEvent} name - The name of the event to dispatch. * @param {IRoutingInfo} [detail] - The routing info to dispatch. */ export declare function dispatchGlobalRouterEvent(name: GlobalRouterEvent, detail?: IRoutingInfo): void; /** * Adds an event listener (or more) to an element and returns a function to unsubscribe. * @template {Event} T * @template {string} eventType * @param {EventTarget} $elem - The element to add the listener(s) to. * @param {eventType[] | eventType} type - The event type(s) to listen for. * @param {(e: T) => void} listener - The listener callback. * @param {boolean | AddEventListenerOptions} [options] - The event listener options. * @returns {EventListenerSubscription} A function to unsubscribe the listener(s). */ export declare function addListener($elem: EventTarget, type: eventType[] | eventType, listener: (e: T) => void, options?: boolean | AddEventListenerOptions): EventListenerSubscription; /** * Removes the event listeners in the array. * @param {EventListenerSubscription[]} listeners - The listeners to remove. */ export declare function removeListeners(listeners: EventListenerSubscription[]): void;