<?php

use App\Http\Controllers\Integration\GoogleCalendarController;
use App\Http\Controllers\Integration\OutlookCalendarController;

Route::get('/integrations/google/redirect', [GoogleCalendarController::class, 'redirect'])->name('integrations.google.redirect');
Route::get('/integrations/google/callback', [GoogleCalendarController::class, 'callback'])->name('integrations.google.callback');
Route::get('/integrations/outlook/redirect', [OutlookCalendarController::class, 'redirect'])->name('integrations.outlook.redirect');
Route::get('/integrations/outlook/callback', [OutlookCalendarController::class, 'callback'])->name('integrations.outlook.callback');

// Unbekannte Routen auf app.aziros.com weiterleiten (gleicher Pfad)
Route::fallback(function (\Illuminate\Http\Request $request) {
    return redirect()->to('https://app.aziros.com' . $request->getRequestUri());
});
