import {
  STORAGE
} from "./chunk-NYBCQZC7.js";
import {
  LocalStorageBackend
} from "./chunk-JWNHNUYL.js";
import {
  MemoryStorageBackend
} from "./chunk-3SZFUTXE.js";
import {
  __decorateClass
} from "./chunk-2E224ZSN.js";

// runtime/subsystems/storage/storage.module.ts
import { Module } from "@nestjs/common";
var StorageModule = class {
  static forRoot(options = { backend: "local" }) {
    const provider = options.backend === "local" ? {
      provide: STORAGE,
      useFactory: () => new LocalStorageBackend(options.basePath ?? "./storage")
    } : {
      provide: STORAGE,
      useClass: MemoryStorageBackend
    };
    return {
      module: StorageModule,
      global: true,
      providers: [provider],
      exports: [STORAGE]
    };
  }
};
StorageModule = __decorateClass([
  Module({})
], StorageModule);

export {
  StorageModule
};
//# sourceMappingURL=chunk-BK5ICA2F.js.map