import { LoggerService } from './LoggerService';
/**
 * @public
 */
export type LifecycleServiceStartupHook = () => void | Promise<void>;
/**
 * @public
 */
export interface LifecycleServiceStartupOptions {
    /**
     * Optional {@link LoggerService} that will be used for logging instead of the default logger.
     */
    logger?: LoggerService;
}
/**
 * @public
 */
export type LifecycleServiceShutdownHook = () => void | Promise<void>;
/**
 * @public
 */
export interface LifecycleServiceShutdownOptions {
    /**
     * Optional {@link LoggerService} that will be used for logging instead of the default logger.
     */
    logger?: LoggerService;
}
/**
 * @public
 */
export interface LifecycleService {
    /**
     * Register a function to be called when the backend has been initialized.
     *
     * @remarks
     *
     * When used with plugin scope it will wait for the plugin itself to have been initialized.
     *
     * When used with root scope it will wait for all plugins to have been initialized.
     */
    addStartupHook(hook: LifecycleServiceStartupHook, options?: LifecycleServiceStartupOptions): void;
    /**
     * Register a function to be called when the backend is shutting down.
     */
    addShutdownHook(hook: LifecycleServiceShutdownHook, options?: LifecycleServiceShutdownOptions): void;
}
