<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\UserController;
use App\Http\Controllers\CustomTableController;
use App\Http\Controllers\Dashboard\RouteController;
use App\Http\Controllers\Dashboard\DataDisplayController;
use App\Http\Controllers\Dropdown\DropdownExportController;
use App\Http\Controllers\LoadingController;
use App\Http\Controllers\Modal\ModalCancelController;
use App\Http\Controllers\Login\LayoutController;
use App\Http\Controllers\NotificationTablesController;
use App\Http\Controllers\Page404Controller;

Route::get('/404', [Page404Controller::class, 'index'])->name('page404');
Route::get('/notification-tables', [NotificationTablesController::class, 'index'])->name('notification-tables.index');
Route::delete('/notification-tables/{id}', [NotificationTablesController::class, 'destroy'])->name('notification-tables.destroy');
Route::post('/notification-tables/batch-delete', [NotificationTablesController::class, 'batchDestroy'])->name('notification-tables.batch-delete');

Route::get('/login/layout', [LayoutController::class, 'index'])->name('login.layout');
Route::get('/modal/cancel', [ModalCancelController::class, 'index'])->name('modal.cancel');
Route::get('/modal/cancel/confirm', [ModalCancelController::class, 'confirm'])->name('modal.cancel.confirm');

Route::get('/loading', [LoadingController::class, 'index'])->name('loading');
Route::post('/dropdown/export', [DropdownExportController::class, 'export'])->name('dropdown.export');
Route::get('/dashboard/data-display', [DataDisplayController::class, 'index'])->name('dashboard.data-display');
Route::get('/view/{id}', function ($id) {
    return "View page for ID: $id";
})->name('view');

Route::get('/dashboard/{component?}', [RouteController::class, 'index'])->name('dashboard.route')->where('component', '[a-zA-Z]+');



Route::get('/custom-table', [CustomTableController::class, 'index'])->name('custom-table.index');
Route::delete('/custom-table/{id}', [CustomTableController::class, 'destroy'])->name('custom-table.destroy');
Route::get('/users', [UserController::class, 'index']);


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

Auth::routes();

Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
