import { HostEventParamsMap } from '@jolibox/types'; /** * Defines the supported custom event names. * @public */ export type CustomEventType = 'onI18nChanged' | 'onBackPress'; /** * @public * Registers a listener for a supported custom event. * The callback will receive parameters specific to the event, as defined in {@link HostEventParamsMap}. * @template T - The type of the event name, constrained to {@link CustomEventType}. * @param event - The name of the event to listen for. * @param callback - The callback function to execute when the event is triggered. Its parameters depend on the event type. */ export declare const onCustomEvent: (event: T, callback: HostEventParamsMap[T]) => void; /** * @public * Unregisters a listener for a custom event. * @template T - The type of the event name, constrained to {@link CustomEventType}. * @param event - The name of the event. * @param callback - The specific callback to remove. If not provided, all listeners for the event might be removed (depending on hostEmitter implementation, though typically a specific callback is required by EventEmitter.off). */ export declare const offCustomEvent: (event: T, callback: HostEventParamsMap[T]) => void; /** * @public * Registers a one-time listener for a custom event. The listener is automatically removed after being invoked once. * @template T - The type of the event name, constrained to {@link CustomEventType}. * @param event - The name of the event to listen for. * @param callback - The callback function to execute. Its parameters depend on the event type from {@link HostEventParamsMap}. */ export declare const onceCustomEvent: (event: T, callback: HostEventParamsMap[T]) => void;