<?php

use App\Http\Controllers\Auth\WorkosController;
use Illuminate\Support\Facades\Route;

Route::livewire('/', 'pages::landing');

Route::middleware(['auth'])->group(function () {
    Route::livewire('/profile', 'pages::profile')->name('profile');
    Route::livewire('/dashboard', 'pages::dashboard')->name('dashboard');
    Route::livewire('/groups', 'pages::groups')->name('groups');
});

Route::get('/login', function () {
    return view('login');
})->name('login');

Route::get('/register', function () {
    return view('register');
})->name('register');

Route::get('/auth/workos', [WorkosController::class, 'redirect'])->name('workos.redirect');
Route::get('/auth/workos/callback', [WorkosController::class, 'callback'])->name('workos.callback');
