<?php

/**
 * Wedding Operation Suite — Route Definitions
 *
 * Registers routes for guest scanner, guest details lookup, event check-in,
 * rejections, manual overrides, and event operation dashboards.
 * Loaded within routes/crew.php and routes/couple.php.
 *
 * @package Inveetaire
 * @ref     RC-013
 */

// ── Event-Specific Operation Workspaces ──────────────────────────────────────
$router->get('/operation/event/{event_id}/checkin', 'App\\Modules\\Operation\\OperationController@showScanner');
$router->post('/operation/event/{event_id}/checkin', 'App\\Modules\\Operation\\OperationController@submitScanner', [
    'App\\Middleware\\CsrfMiddleware'
]);

$router->get('/operation/event/{event_id}/guest/{guest_code}', 'App\\Modules\\Operation\\OperationController@showGuest');
$router->post('/operation/event/{event_id}/guest/{guest_code}/checkin', 'App\\Modules\\Operation\\OperationController@checkin', [
    'App\\Middleware\\CsrfMiddleware'
]);
$router->post('/operation/event/{event_id}/guest/{guest_code}/reject', 'App\\Modules\\Operation\\OperationController@reject', [
    'App\\Middleware\\CsrfMiddleware'
]);
$router->post('/operation/event/{event_id}/guest/{guest_code}/cancel_checkin', 'App\\Modules\\Operation\\OperationController@cancelCheckin', [
    'App\\Middleware\\CsrfMiddleware'
]);

// ── Legacy/General Dashboard (Redirect or resolve to default pilot event) ────
$router->get('/operation/scanner', 'App\\Modules\\Operation\\OperationController@showScanner');
$router->post('/operation/scanner', 'App\\Modules\\Operation\\OperationController@submitScanner', [
    'App\\Middleware\\CsrfMiddleware'
]);
$router->get('/operation/guest/{guest_code}', 'App\\Modules\\Operation\\OperationController@showGuest');
$router->post('/operation/guest/{guest_code}/checkin', 'App\\Modules\\Operation\\OperationController@checkin', [
    'App\\Middleware\\CsrfMiddleware'
]);
$router->get('/operation/dashboard', 'App\\Modules\\Operation\\OperationController@showDashboard');
