/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import type { Behavior } from "#behavior/Behavior.js";
import type { BehaviorBacking } from "#behavior/internal/BehaviorBacking.js";
import type { Endpoint } from "#endpoint/Endpoint.js";
import { Observable } from "#general";
import type { ServerNode } from "#node/ServerNode.js";
/**
 * High-level change notification service.
 *
 * This service provides an optimized path to detecting property changes for all endpoints associated with a node.  This
 * includes endpoints on peers.
 */
export declare class ChangeNotificationService {
    #private;
    constructor(node: ServerNode);
    /**
     * Change event source.
     */
    get change(): Observable<[changes: ChangeNotificationService.Change], void>;
    /**
     * Invoked by the {@link BehaviorBacking} when state changes.
     */
    broadcastUpdate(backing: BehaviorBacking, properties: string[]): void;
    close(): void;
}
export declare namespace ChangeNotificationService {
    type Key = string | number;
    /**
     * Emits when state changes.
     *
     * If present, {@link properties} indicates the specific updated properties.  Otherwise the recipient should
     * consider all properties.
     */
    interface PropertyUpdate {
        kind: "update";
        endpoint: Endpoint;
        behavior: Behavior.Type;
        version: number;
        properties?: string[];
    }
    /**
     * Emits when endpoints/nodes are deleted.
     *
     * This indicates to the recipient to drop the associated data subtree.
     */
    interface EndpointDelete {
        kind: "delete";
        endpoint: Endpoint;
    }
    type Change = PropertyUpdate | EndpointDelete;
}
//# sourceMappingURL=ChangeNotificationService.d.ts.map