<?php
use KrothiumAPI\Http\Router;
use WorkbloomERP\Module\v0\Auth\Middlewares\AuthMiddleware;
use WorkbloomERP\Module\v0\Auth\Controllers\AuthController;

Router::group(
    prefix: '/auth',
    callback: function() {
        // Rota de autenticação
        Router::post(uri: '/login', handler: [AuthController::class, 'login']);

        // Rota para seleção de empresa após login inicial
        Router::post(uri: '/select-company', handler: [AuthController::class, 'selectCompany'], middlewares: [[AuthMiddleware::class, 'isInitialLogin']]);
    }
);