<?php

use App\Http\Controllers\Admin\AdminController;
use App\Http\Controllers\RegistrasiController;
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 and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

Route::get('/', [RegistrasiController::class,'create'])->name('user.create');
Route::post('/store', [RegistrasiController::class,'store'])->name('user.store');

Route::get('/home', [AdminController::class,'index'])->name('admin.home');

Route::get('/user', [AdminController::class, 'index_user'])->name('admin.index_user');
Route::post('/createuser', [AdminController::class, 'store_user'])->name('admin.create_user');
Route::put('/updateuser/{id}', [AdminController::class, 'update_user'])->name('admin.update_user');
Route::get('/deleteuser/{id}', [AdminController::class, 'delete_user'])->name('admin.delete_user');

Route::get('/kegiatan', [AdminController::class, 'index_kegiatan'])->name('admin.index_kegiatan');
Route::post('/createkegiatan', [AdminController::class, 'store_kegiatan'])->name('admin.create_kegiatan');
Route::put('/updatekegiatan/{id}', [AdminController::class, 'update_kegiatan'])->name('admin.update_kegiatan');
Route::get('/deletekegiatan/{id}', [AdminController::class, 'delete_kegiatan'])->name('admin.delete_kegiatan');

Route::get('/konferensi', [AdminController::class, 'index_konferensi'])->name('admin.index_konferensi');
Route::post('/createkonferensi', [AdminController::class, 'store_konferensi'])->name('admin.create_konferensi');
Route::put('/updatekonferensi/{id}', [AdminController::class, 'update_konferensi'])->name('admin.update_konferensi');
Route::get('/deletekonferensi/{id}', [AdminController::class, 'delete_konferensi'])->name('admin.delete_konferensi');

Route::get('/peserta', [AdminController::class, 'index_peserta'])->name('admin.index_peserta');
Route::get('/download_peserta', [AdminController::class, 'download_peserta'])->name('admin.download_peserta');
Route::get('/delete_peserta/{id}', [AdminController::class, 'delete_peserta'])->name('admin.delete_peserta');

Route::post('/add-kegiatan', [RegistrasiController::class, 'addFormKegiatan'])->name('registrasi.form-kegiatan.add');
