/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import {
  Construction,
  ImplementationError
} from "@matter/general";
class NodeStore {
  #storageFactory;
  #construction;
  /**
   * Obtain the BDX blob storage driver for this node.  Lazily opened on first call.
   * Override in subclasses that support blob storage.
   */
  async bdxStore() {
    throw new ImplementationError("Blob storage is not available for this node store");
  }
  get construction() {
    return this.#construction;
  }
  constructor(storageFactory) {
    this.#storageFactory = storageFactory;
    this.#construction = Construction(this);
  }
  toString() {
    return "node store";
  }
  [Construction.construct]() {
    return this.load();
  }
  createStorageContext(name) {
    return this.#storageFactory.createContext(name);
  }
  get storageFactory() {
    return this.#storageFactory;
  }
}
export {
  NodeStore
};
//# sourceMappingURL=NodeStore.js.map
