<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\PageController;
use App\Http\Controllers\ProjectController;
use App\Http\Controllers\BlogController;
use App\Http\Controllers\ContactController;
use App\Http\Controllers\LandWantedController;



Route::fallback(function () {
    return redirect()->route('404');
});


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


/* ─── Home ─────────────────────────────────────────────── */
Route::get('/', [HomeController::class, 'index'])->name('home');



/* ─── Static Pages ──────────────────────────────────────── */
Route::get('/about', [PageController::class, 'about'])->name('about');
Route::get('/development', [PageController::class, 'development'])->name('development');



/* ─── Projects ──────────────────────────────────────────── */
Route::prefix('projects')->name('projects.')->group(function () {
    Route::get('/', [ProjectController::class, 'index'])->name('index');

    Route::prefix('handover')->as('handover.')->group(function () {
        Route::get('/', [ProjectController::class, 'handover'])->name('index');
        Route::get('/jahanara-garden', [ProjectController::class, 'JahanaraGarden'])->name('jahanara-garden');
        Route::get('/talukder-nibash', [ProjectController::class, 'TalukderNibash'])->name('talukder-nibash');
        Route::get('/akhter-tower', [ProjectController::class, 'AkhterTower'])->name('akhter-tower');
        Route::get('/balaka', [ProjectController::class, 'Balaka'])->name('balaka');
    });



    Route::prefix('ongoing')->as('ongoing.')->group(function () {
        Route::get('/',  [ProjectController::class, 'ongoing'])->name('index');
        Route::get('/prestigious-palace', [ProjectController::class, 'PrestigePalace'])->name('prestige-palace');
        Route::get('/arshukas-heaven', [ProjectController::class, 'ArshukasHeaven'])->name('arshukas-heaven');
    });


    Route::prefix('ready-to-sale')->as('ready-to-sale.')->group(function () {
        Route::get('/',    [ProjectController::class, 'readyToSale'])->name('index');
    });


    Route::prefix('upcoming')->as('upcoming.')->group(function () {
        Route::get('/', [ProjectController::class, 'upcoming'])->name('index');
        
    });

    // Route::get('/details',   [ProjectController::class, 'details'])->name('show');
});



/* ─── Land Wanted ───────────────────────────────────────── */
Route::get('/land-wanted',        [LandWantedController::class, 'index'])->name('land-wanted');
Route::post('/land-wanted',       [LandWantedController::class, 'store'])->name('land-wanted.store');

/* ─── Blog ──────────────────────────────────────────────── */
Route::prefix('blog')->as('blog.')->group(function () {
    Route::get('/',         [BlogController::class, 'index'])->name('index');
    Route::get('/details',  [BlogController::class, 'show'])->name('blog.show');
    Route::get('/details/one', [BlogController::class, 'blogOneDetails'])->name('details-one');
    Route::get('/details/two', [BlogController::class, 'blogTwoDetails'])->name('details-two');
    Route::get('/details/three', [BlogController::class, 'blogThreeDetails'])->name('details-three');
});




/* ─── Contact ───────────────────────────────────────────── */
Route::get('/contact',   [ContactController::class, 'index'])->name('contact');
Route::post('/contact',  [ContactController::class, 'store'])->name('contact.store');
