import { DecoratorDriver } from '../../engine/code-writer/drivers/decorator.driver.js';
import { ImportDriver } from '../../engine/code-writer/drivers/import.driver.js';
import { addProviderToModule, declareBackPackageModule, runGraphqlTypes, } from '../package-helpers.js';
export default async function install(ctx) {
    await ctx.install(['sharp', 'form-data']);
    await ctx.install(['@types/multer'], { dev: true });
    declareBackPackageModule(ctx, 'StorageAccountModule', '@app/modules/storage-account/storage-account.module');
    const sharedModule = ctx.sourceFile('app', 'shared.module.ts');
    addProviderToModule(sharedModule, 'SharedModule', 'Module', 'providers', 'FileManagerService', 'StorageAccountFileManagerService', '@app/modules/storage-account/file-manager/application/storage-account-file-manager.service', ['FileManagerService', 'StorageAccountFileManagerService']);
    DecoratorDriver.addModuleDecoratorProperty(sharedModule, 'SharedModule', 'Module', 'exports', 'FileManagerService');
    ImportDriver.createImportItems(sharedModule, '@app/modules/storage-account/sas/application/storage-account-sas.service', ['SasService', 'StorageAccountSasService']);
    addProviderToModule(sharedModule, 'SharedModule', 'Module', 'providers', 'SasService', 'StorageAccountSasService', '@app/modules/storage-account/sas/application/storage-account-sas.service', ['SasService', 'StorageAccountSasService']);
    DecoratorDriver.addModuleDecoratorProperty(sharedModule, 'SharedModule', 'Module', 'exports', 'SasService');
    sharedModule.saveSync();
    await runGraphqlTypes(ctx);
}
