import { usePointer, useRaf, useResize, useScroll, useKey } from '../../services/index.js'; import type { PointerServiceInterface, RafServiceInterface, ResizeServiceInterface, ScrollServiceInterface, KeyServiceInterface, ServiceInterface } from '../../services/index.js'; import { AbstractManager } from './AbstractManager.js'; declare const SERVICES_MAP: { scrolled: typeof useScroll; resized: typeof useResize; ticked: typeof useRaf; moved: typeof usePointer; keyed: typeof useKey; }; type Services = { scrolled: ScrollServiceInterface; resized: ResizeServiceInterface; ticked: RafServiceInterface; moved: PointerServiceInterface; keyed: KeyServiceInterface; } & Record>; type ServiceProps = typeof SERVICES_MAP & Record() => ServiceInterface>; type ServiceNames = keyof Services; /** * Services management for the Base class. * * @todo Add support for disabled services on mount when the method is defined. */ export declare class ServicesManager extends AbstractManager { /** * Custom props * @private */ __props: ServiceProps; /** * Test if the given service is registered. */ has(service: ServiceNames | string): boolean; /** * Get a service props by name. */ get(service: S): ReturnType; /** * Init the given service and bind it to the given instance. * * @param {ServiceNames} service The name of the service. * @return {() => void} A function to unbind the service. */ enable(service: ServiceNames): () => void; /** * Enable all services and return methods to disable them. */ enableAll(): (() => void)[]; /** * Disable all services. * * @return {void} */ disableAll(): void; /** * Disable a service. */ disable(service: ServiceNames): void; /** * Toggle a service. */ toggle(service: ServiceNames, force?: boolean): void; /** * Register a new service to be enabled/disabled. * * @param {string} name * The name of the service hook. * @param {(...args:unknown[]) => ServiceInterface} useFunction * The `use...` function for the service. */ register(name: string, useFunction: (...args: unknown[]) => ServiceInterface): void; /** * Unregister a new service to be enabled disabled. * * @param {string} name * The name of the service hook. */ unregister(name: string): void; } export {};