import { UseDeepSignalResult } from "@ng-org/alien-deepsignals/svelte4";
import { DiscreteRoot } from "../../types.ts";
/**
* Svelte 4 hook to subscribe to discrete (JSON) CRDT documents.
* You can modify the returned object like any other JSON object. Changes are immediately
* reflected in the CRDT.
*
* Establishes a 2-way binding: Modifications to the object are immediately committed,
* changes coming from the backend (or other components) cause an immediate rerender.
*
* In comparison to {@link svelte4UseShape}, discrete CRDTs are untyped.
* You can put any JSON data inside and need to validate the schema yourself.
*
* @param documentIdOrPromise The NURI of the CRDT document or a promise to that.
* @returns The store of the reactive JSON object of the CRDT document or undefined.
*
* @example
* ```svelte
*
*
*
* Nothing tracked yet - log your first purchase to kick things off.
*