<?php
/**
 * Routes Snippet — Add these to existing route files
 */

// ─── Branch Routes (add to /gmind/routes/branch.php) ──────────────────────

// Download combined cert+marksheet
$router->get('/branch/cert-gen/{certId}/download-combined', 'BranchAdmin\Controllers\BranchCertGenController@downloadCombined', ['branch_admin']);

// Edit & Delete Result
$router->get('/branch/cert-gen/edit/{id}', 'BranchAdmin\Controllers\BranchResultEditController@edit', ['branch_admin']);
$router->post('/branch/cert-gen/update/{id}', 'BranchAdmin\Controllers\BranchResultEditController@update', ['branch_admin']);
$router->get('/branch/cert-gen/delete/{id}', 'BranchAdmin\Controllers\BranchResultEditController@confirmDelete', ['branch_admin']);
$router->post('/branch/cert-gen/delete/{id}', 'BranchAdmin\Controllers\BranchResultEditController@delete', ['branch_admin']);


// ─── Super Admin Routes (add to /gmind/routes/super_admin.php) ────────────

// Download/View PDF
$router->get('/super-admin/documents/{id}/pdf', 'SuperAdmin\Controllers\SuperAdminDocumentController@downloadPdf', ['super_admin']);

// Download combined cert+marksheet
$router->get('/super-admin/documents/{id}/combined', 'SuperAdmin\Controllers\SuperAdminDocumentController@downloadCombined', ['super_admin']);


// ─── Public Routes (add to /gmind/routes/web.php) ─────────────────────────
// NOTE: These should already exist — verify they point to App\Controllers\VerificationController

$router->get('/verify', 'App\Controllers\VerificationController@index');
$router->get('/verify/{documentNumber}', 'App\Controllers\VerificationController@verify');
$router->post('/verify', 'App\Controllers\VerificationController@search');
