/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { AsyncObservable, Observable } from "#general";
import type { Endpoint } from "../Endpoint.js";
/**
 * State related to a {@link Endpoint}'s lifecycle.
 */
export declare class EndpointLifecycle {
    #private;
    /**
     * Emitted when an endpoint is installed into an initialized owner.
     */
    get installed(): Observable<[], void>;
    /**
     * Emitted when an endpoint is fully initialized excepting children.
     */
    get ready(): Observable<[], void>;
    /**
     * Emitted when an endpoint is fully initialized including children.
     */
    get partsReady(): Observable<[], void>;
    /**
     * @deprecated use {@link partsReady}
     */
    get treeReady(): Observable<[], void>;
    /**
     * Emitted when the endpoint begins destruction.
     */
    get destroying(): Observable<[], void>;
    /**
     * Emitted when the endpoint is destroyed.
     */
    get destroyed(): Observable<[], void>;
    /**
     * Bubbling event indicating changes to endpoint structure.
     */
    get changed(): Observable<[type: EndpointLifecycle.Change, endpoint: Endpoint<import("../index.js").EndpointType.Empty>], void>;
    /**
     * Emitted on factory reset.
     */
    get reset(): AsyncObservable<[], void>;
    /**
     * Is the {@link Endpoint} installed in a {@link Node}?
     */
    get isInstalled(): boolean;
    /**
     * Is the {@link Endpoint} fully initialized, excepting children?
     */
    get isReady(): boolean;
    /**
     * Is the {@link Endpoint} fully initialized, including children?
     */
    get isPartsReady(): boolean;
    /**
     * @deprecated use {@link isPartsReady}
     */
    get isTreeReady(): boolean;
    /**
     * Designates endpoint as essential.
     *
     * By default endpoints are considered "essential".  An essential endpoint must initialize successfully or an error
     * is thrown.  Non-essential endpoints may be installed even if they have errors.
     *
     * You may configure this property via {@link Endpoint.Configuration#isEssential}.
     */
    get isEssential(): boolean;
    /**
     * Does the endpoint have an ID?
     */
    get hasId(): boolean;
    /**
     * Does the endpoint have an endpoint number?
     */
    get hasNumber(): boolean;
    constructor(endpoint: Endpoint, isEssential?: boolean);
    /**
     * Bubble a lifecycle change event from a child.
     */
    bubble(type: EndpointLifecycle.Change, endpoint: Endpoint): void;
    /**
     * Inform the Lifecycle of a change in lifecycle.
     */
    change(type: EndpointLifecycle.Change): void;
    protected emitError(name: string, error: Error): void;
    /**
     * Revert to uninstalled state.
     */
    resetting(): void;
}
export declare namespace EndpointLifecycle {
    enum Change {
        Installed = "installed",
        Ready = "ready",
        PartsReady = "partsReady",
        Crashed = "crashed",
        Destroying = "destroying",
        Destroyed = "destroyed",
        ServersChanged = "serversChanged",
        ClientsChanged = "clientsChanged",
        IdAssigned = "idAssigned",
        NumberAssigned = "numberAssigned"
    }
}
//# sourceMappingURL=EndpointLifecycle.d.ts.map