import { createTsImportMap, createTsImportMapSchema, packageScope, } from '@baseplate-dev/core-generators';
import { userSessionServiceImportsProvider, userSessionServiceImportsSchema, } from '@baseplate-dev/fastify-generators';
import { createGeneratorTask, createReadOnlyProviderType, } from '@baseplate-dev/sync';
import { LOCAL_AUTH_CORE_AUTH_MODULE_PATHS } from './template-paths.js';
export const authModuleImportsSchema = createTsImportMapSchema({
    cleanupExpiredAuthVerifications: {},
    createAuthVerification: {},
    userSessionPayload: {},
    validateAuthVerification: {},
});
export const authModuleImportsProvider = createReadOnlyProviderType('auth-module-imports');
const localAuthCoreAuthModuleImportsTask = createGeneratorTask({
    dependencies: {
        paths: LOCAL_AUTH_CORE_AUTH_MODULE_PATHS.provider,
    },
    exports: {
        authModuleImports: authModuleImportsProvider.export(packageScope),
        userSessionServiceImports: userSessionServiceImportsProvider.export(packageScope),
    },
    run({ paths }) {
        return {
            providers: {
                authModuleImports: createTsImportMap(authModuleImportsSchema, {
                    cleanupExpiredAuthVerifications: paths.servicesAuthVerification,
                    createAuthVerification: paths.servicesAuthVerification,
                    userSessionPayload: paths.schemaUserSessionPayloadObjectType,
                    validateAuthVerification: paths.servicesAuthVerification,
                }),
                userSessionServiceImports: createTsImportMap(userSessionServiceImportsSchema, { userSessionService: paths.userSessionService }),
            },
        };
    },
});
export const LOCAL_AUTH_CORE_AUTH_MODULE_IMPORTS = {
    task: localAuthCoreAuthModuleImportsTask,
};
//# sourceMappingURL=ts-import-providers.js.map