<?php

use App\Http\Controllers\AjaxController;
use App\Http\Controllers\PageController;
use Illuminate\Support\Facades\Route;

// Page routes (views only)
Route::view('/', 'home')->name('home');
Route::view('/about-us', 'about')->name('about');
Route::view('/services', 'services.index')->name('services');

Route::get('/services/{slug}', [PageController::class, 'servicesShow'])->name('services.show');
Route::get('/portfolio', [PageController::class, 'portfolio'])->name('portfolio');
Route::get('/career', [PageController::class, 'career'])->name('career');
Route::get('/contact', [PageController::class, 'contact'])->name('contact');
Route::get('/service-quotation', [PageController::class, 'quotation'])->name('quotation');

// AJAX routes
Route::post('/ajax/contact', [AjaxController::class, 'contact'])->name('ajax.contact');
Route::post('/ajax/quotation', [AjaxController::class, 'quotation'])->name('ajax.quotation');

// AJAX: load service detail on home page
Route::get('/ajax/service/{id}', [AjaxController::class, 'service'])->name('ajax.service');
