<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\QuotationDocumentController;
use App\Http\Controllers\CustomerConversionController;
use App\Http\Controllers\QuoteDecisionController;
use App\Http\Controllers\HealthController;

Route::get('/health', HealthController::class)->name('health');
Route::middleware('session.auth')->group(function () {
    Route::get('/quotations/{quotation}/document', [QuotationDocumentController::class,'document'])->middleware('permission:quotations.print')->name('quotations.document');
    Route::post('/leads/{lead}/convert-customer', [CustomerConversionController::class,'convert'])->middleware('permission:leads.edit')->name('leads.convert-customer');
    Route::post('/quotations/{quotation}/status', [QuoteDecisionController::class,'update'])->middleware('permission:quotations.approve')->name('quotations.status-update');
});
