<?php

use App\Http\Controllers\Authentication\LoginController;
use App\Http\Controllers\GetDataController;
use App\Http\Controllers\User\BukuAjarController;
use App\Http\Controllers\User\FasilitasController;
use App\Http\Controllers\User\KekayaanIntelController;
use App\Http\Controllers\User\KontrakKerjaController;
use App\Http\Controllers\User\PenelitianSumberDanaController;
use App\Http\Controllers\User\PenelitiAsingController;
use App\Http\Controllers\User\PenyelenggaraanSeminarController;
use App\Http\Controllers\User\PublikasiArtikelController;
use App\Http\Controllers\User\PublikasiJurnalController;
use App\Http\Controllers\User\StafPendukungController;
use App\Http\Controllers\User\UnitBisnisController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('dashboard');
});

Route::get('login', [LoginController::class, 'index'])->name('login');
Route::get('sso/{email}/{sessionid}', [LoginController::class, 'sso']);

Route::middleware(['auth:sanctum', 'verified'])->group(function () {
    Route::get('/get-biodata', [GetDataController::class, 'getBiodata']);
});

Route::group(['middleware' => ['auth:sanctum', 'verified']], function () {
    Route::get('/dashboard', function () {
        return view('dashboard');
    })->name('dashboard');

Route::resource('/bukuajar', BukuAjarController::class);
Route::resource('/fasilitas', FasilitasController::class);
Route::resource('/kekayaanintelek', KekayaanIntelController::class);
Route::resource('/kontrakkerja', KontrakKerjaController::class);
Route::resource('/penelitiansumber', PenelitianSumberDanaController::class);
Route::resource('/penelitiasing', PenelitiAsingController::class);
Route::resource('/publikasiartikel', PublikasiArtikelController::class);
Route::resource('/publikasijurnal', PublikasiJurnalController::class);
Route::resource('/penyelengaraseminar', PenyelenggaraanSeminarController::class);
Route::resource('/stafpendukung', StafPendukungController::class);
Route::resource('/unitbisnis', UnitBisnisController::class);

});
