"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FileServiceFactory = void 0;
const file_service_interface_1 = require("./file-service.interface");
const disk_file_service_1 = require("./disk-file.service");
const s3_file_service_1 = require("./s3-file.service");
exports.FileServiceFactory = {
    provide: file_service_interface_1.FILE_SERVICE,
    useFactory: (diskFileService, s3FileService) => {
        const defaultService = process.env.DEFAULT_FILE_SERVICE ?? 'disk';
        switch (defaultService.toLowerCase()) {
            case 's3':
                return s3FileService;
            case 'disk':
            default:
                return diskFileService;
        }
    },
    inject: [disk_file_service_1.DiskFileService, s3_file_service_1.S3FileService],
};
//# sourceMappingURL=file-service.factory.js.map