export declare enum ServiceState {
    /**
     * The service instance was created.
     * This is the starting point for any service.
     */
    Initialized = 0,
    /**
     * After the `onCreate()` callback was called.
     */
    Created = 1,
    /**
     * After the `onStart()` callback was called.
     */
    Started = 2,
    /**
     * After the `onStop()` callback was called.
     */
    Stopped = 3,
    /**
     * After the `onDestroy()` callback was called.
     */
    Destroyed = 4
}
export declare class Service extends EventTarget {
    #private;
    /**
     * When set it will be used as the key to register and lookup a container.
     */
    static key?: string;
    get currentState(): ServiceState;
    /**
     * Called only once when the service is created. Use this for one-time setup
     * (e.g. fetching initial data or configuration).
     */
    protected onCreate?(): Promise<void>;
    /**
     * Called when the service is started (either explicitly or implicitly by the first method call).
     * Useful for setting up resources or connections that might need to be re-established
     * if the service was previously stopped.
     */
    protected onStart?(): Promise<void>;
    /**
     * Called when the service is stopped (e.g., because the application is closing).
     * Use this to release resources or clean up.
     */
    protected onStop?(): Promise<void>;
    /**
     * Called just before the service is destroyed.
     */
    protected onDestroy?(): Promise<void>;
    /**
     * Start the service explicitly. It won't be called again until the service stops first.
     */
    start(): Promise<void>;
    /**
     * Stop the service explicitly. This allows the service to release resources, close connections, etc.
     */
    stop(): Promise<void>;
    destroy(): Promise<void>;
    isDestroyed(): boolean;
}
//# sourceMappingURL=Service.d.ts.map