import { DynamicModule } from '@nestjs/common';

/**
 * Storage subsystem — NestJS module factory
 *
 * Register once in AppModule (global: true means all other modules can inject
 * STORAGE without importing StorageModule themselves):
 *
 * ```typescript
 * // app.module.ts
 * @Module({
 *   imports: [
 *     StorageModule.forRoot({ backend: 'local', basePath: './uploads' }),
 *   ],
 * })
 * export class AppModule {}
 * ```
 *
 * Swap to memory backend in tests:
 * ```typescript
 * Test.createTestingModule({
 *   imports: [StorageModule.forRoot({ backend: 'memory' })],
 * });
 * ```
 */

interface StorageModuleOptions {
    /** Which backend to activate. */
    backend: 'local' | 'memory';
    /**
     * Base path for the local backend (resolved to an absolute path).
     * Ignored when backend is 'memory'. Defaults to `./storage`.
     */
    basePath?: string;
}
declare class StorageModule {
    static forRoot(options?: StorageModuleOptions): DynamicModule;
}

export { StorageModule, type StorageModuleOptions };
