<?php

use Illuminate\Support\Facades\Route;

use App\Http\Controllers\API\MobileAuthController;


Route::prefix('mobile')->group(function () {
    Route::post('/user/authentication', [MobileAuthController::class, 'twoFactorAuthentication']);

    // Worker authentications
    Route::post('/worker/auth/login', [MobileAuthController::class, 'workerLogin']);
    Route::post('/worker/auth/refresh', [MobileAuthController::class, 'workerRefreshToken']);

    // Company user authentications
    Route::post('/company/auth/login', [MobileAuthController::class, 'companyUserLogin']);
    Route::post('/company/auth/refresh',  [MobileAuthController::class, 'companyUserRefreshToken']);

    // 2FA code verification
    Route::post('/user/2fa-send-code', [MobileAuthController::class, 'send2faVerificationCode']);
    Route::post('/user/2fa-verify-code', [MobileAuthController::class, 'verify2faCode']);
});