export class DomainElement {
    /**
     * A reference to the root DataDomain instance.
     */
    root;
    /**
     * The root DataDomain instance.
     */
    get domain() {
        return this.root;
    }
    /**
     * The unique key of the domain element.
     * Since keys are immutable, we use a private field to store the key.
     */
    #key;
    /**
     * The unique key of the domain element.
     */
    get key() {
        return this.#key;
    }
    /**
     * @param root The root DataDomain instance.
     * @param key The unique key of the domain element.
     */
    constructor(root, key) {
        this.root = root;
        this.#key = key;
    }
}
//# sourceMappingURL=DomainElement.js.map