<?php

use App\Http\Controllers\ProfileController;
use Illuminate\Support\Facades\Route;

Route::get('/', [App\Http\Controllers\HomeController::class, 'index']);
Route::get('/guidelines', function () {
    return view('guidelines');
})->name('guidelines');

Route::get('/publications/{year}', function ($year) {
    // In a real app, this would fetch data from DB
    return "<h1>List of Publications for Year: " . htmlspecialchars($year) . "</h1><p>Full list coming soon...</p>";
})->name('publications.year');

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

Route::middleware('auth')->group(function () {
    Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
    Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
    Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
});

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

require __DIR__ . '/auth.php';

Route::get('/conference/{slug}', [App\Http\Controllers\ConferenceSiteController::class, 'index'])->name('conference.show');
Route::get('/conference/{slug}/call-for-papers', [App\Http\Controllers\ConferenceSiteController::class, 'callForPapers'])->name('conference.call-for-papers');
Route::get('/conference/{slug}/abstract-submission', [App\Http\Controllers\ConferenceSiteController::class, 'abstractSubmission'])->name('conference.abstract-submission');
Route::get('/conference/{slug}/registration-fees', [App\Http\Controllers\ConferenceSiteController::class, 'registrationFees'])->name('conference.registration-fees');
Route::get('/conference/{slug}/contact-us', [App\Http\Controllers\ConferenceSiteController::class, 'contactUs'])->name('conference.contact-us');
Route::get('/conference/{slug}/accommodations', [App\Http\Controllers\ConferenceSiteController::class, 'accommodations'])->name('conference.accommodations');
Route::get('/conference/{slug}/visa', [App\Http\Controllers\ConferenceSiteController::class, 'visa'])->name('conference.visa');
Route::get('/conference/{slug}/tour', [App\Http\Controllers\ConferenceSiteController::class, 'tour'])->name('conference.tour');
Route::get('/conference/{slug}/venue-and-travel', [App\Http\Controllers\ConferenceSiteController::class, 'venueTravel'])->name('conference.venue-travel');
Route::get('/conference/{slug}/proceedings', [App\Http\Controllers\ProceedingsController::class, 'index'])->name('conference.proceedings');
Route::get('/conference/{slug}/journal-partners', [App\Http\Controllers\JournalPartnerController::class, 'index'])->name('conference.journal-partners');

// About Dropdown Pages
Route::get('/conference/{slug}/schedule', [App\Http\Controllers\ConferenceAboutController::class, 'schedule'])->name('conference.schedule');
Route::get('/conference/{slug}/abstract-guidelines', [App\Http\Controllers\ConferenceAboutController::class, 'abstractGuidelines'])->name('conference.abstract-guidelines');
Route::get('/conference/{slug}/full-paper-guidelines', [App\Http\Controllers\ConferenceAboutController::class, 'fullPaperGuidelines'])->name('conference.full-paper-guidelines');
Route::get('/conference/{slug}/history', [App\Http\Controllers\ConferenceAboutController::class, 'history'])->name('conference.history');
Route::get('/conference/{slug}/participation-opportunities', [App\Http\Controllers\ConferenceAboutController::class, 'participationOpportunities'])->name('conference.participation-opportunities');
Route::get('/conference/{slug}/organizing-team', [App\Http\Controllers\ConferenceAboutController::class, 'organizingTeam'])->name('conference.organizing-team');
Route::get('/conference/{slug}/co-chair-keynote', [App\Http\Controllers\ConferenceAboutController::class, 'coChairKeynote'])->name('conference.co-chair-keynote');
Route::get('/conference/{slug}/scientific-committee', [App\Http\Controllers\ConferenceAboutController::class, 'scientificCommittee'])->name('conference.scientific-committee');
Route::get('/conference/{slug}/academic-partners', [App\Http\Controllers\ConferenceAboutController::class, 'academicPartners'])->name('conference.academic-partners');
Route::get('/conference/{slug}/presentation-guidelines', [App\Http\Controllers\ConferenceAboutController::class, 'presentationGuidelines'])->name('conference.presentation-guidelines');
Route::get('/conference/{slug}/sponsors', [App\Http\Controllers\ConferenceAboutController::class, 'sponsors'])->name('conference.sponsors');
Route::get('/conference/{slug}/research-library', [App\Http\Controllers\ConferenceAboutController::class, 'researchLibrary'])->name('conference.research-library');

// Main Site Generic Pages
Route::get('/info/{category}/{page}', [App\Http\Controllers\MainSiteController::class, 'show'])->name('main.page');
