/**
 * @ai-summary User import routes
 * @ai-context Route definitions for user data import
 */

import { FastifyPluginAsync } from 'fastify';
import { UserImportController } from './user-import.controller';

export const userImportRoutes: FastifyPluginAsync = async (fastify) => {
  const controller = new UserImportController();

  fastify.post('/user/import', {
    preHandler: [(fastify as any).authenticate],
    handler: controller.uploadAndImport.bind(controller),
  });

  fastify.post('/user/import/preview', {
    preHandler: [(fastify as any).authenticate],
    handler: controller.generatePreview.bind(controller),
  });
};
