<?php

use App\Http\Controllers\Admin\ContractSectionController;

Route::prefix('contract-sections')->name('contract-sections.')->middleware(['auth', 'role:admin|editor'])->group(function () {
    Route::get('/create/{idTemplateSection}', [ContractSectionController::class, 'create'])->name('create');
    Route::get('/{id}/{idTemplateSection}/edit', [ContractSectionController::class, 'edit'])->name('edit');
    Route::get('/{id}/{idTemplateSection}', [ContractSectionController::class, 'show'])->name('show');
    Route::get('/{idTemplateSection}', [ContractSectionController::class, 'index'])->name('index');

    Route::post('/', [ContractSectionController::class, 'store'])->name('store');
    Route::put('/{id}/{idTemplateSection}', [ContractSectionController::class, 'update'])->name('update');
    Route::delete('/{id}/{idTemplateSection}', [ContractSectionController::class, 'destroy'])->name('destroy');
});