import { typescriptFileProvider } from '@baseplate-dev/core-generators';
import { configServiceImportsProvider, errorHandlerServiceImportsProvider, loggerServiceImportsProvider, } from '@baseplate-dev/fastify-generators';
import { createGeneratorTask, createProviderType } from '@baseplate-dev/sync';
import { STRIPE_FASTIFY_STRIPE_PATHS } from './template-paths.js';
import { STRIPE_FASTIFY_STRIPE_TEMPLATES } from './typed-templates.js';
const stripeFastifyStripeRenderers = createProviderType('stripe-fastify-stripe-renderers');
const stripeFastifyStripeRenderersTask = createGeneratorTask({
    dependencies: {
        configServiceImports: configServiceImportsProvider,
        errorHandlerServiceImports: errorHandlerServiceImportsProvider,
        loggerServiceImports: loggerServiceImportsProvider,
        paths: STRIPE_FASTIFY_STRIPE_PATHS.provider,
        typescriptFile: typescriptFileProvider,
    },
    exports: {
        stripeFastifyStripeRenderers: stripeFastifyStripeRenderers.export(),
    },
    run({ configServiceImports, errorHandlerServiceImports, loggerServiceImports, paths, typescriptFile, }) {
        return {
            providers: {
                stripeFastifyStripeRenderers: {
                    pluginsGroup: {
                        render: (options) => typescriptFile.renderTemplateGroup({
                            group: STRIPE_FASTIFY_STRIPE_TEMPLATES.pluginsGroup,
                            paths,
                            importMapProviders: {
                                configServiceImports,
                                errorHandlerServiceImports,
                                loggerServiceImports,
                            },
                            generatorPaths: paths,
                            ...options,
                        }),
                    },
                    servicesGroup: {
                        render: (options) => typescriptFile.renderTemplateGroup({
                            group: STRIPE_FASTIFY_STRIPE_TEMPLATES.servicesGroup,
                            paths,
                            importMapProviders: {
                                configServiceImports,
                            },
                            ...options,
                        }),
                    },
                    webhookServicesGroup: {
                        render: (options) => typescriptFile.renderTemplateGroup({
                            group: STRIPE_FASTIFY_STRIPE_TEMPLATES.webhookServicesGroup,
                            paths,
                            ...options,
                        }),
                    },
                },
            },
        };
    },
});
export const STRIPE_FASTIFY_STRIPE_RENDERERS = {
    provider: stripeFastifyStripeRenderers,
    task: stripeFastifyStripeRenderersTask,
};
//# sourceMappingURL=template-renderers.js.map