<?php

/**
 * Public Invitation Module — Route Definitions
 *
 * Registers the unauthenticated guest invitation routing entry.
 * Loaded within routes/public.php.
 *
 * GET /{workspace_slug}/i/{guest_token} -> PublicInvitationController@show
 *
 * Available variable: $router (App\Core\Router instance)
 *
 * @package Inveetaire
 * @ref     PILOT-003
 */

$router->get('/i/media/serve', 'App\\Modules\\Media\\MediaController@servePublic');
$router->get('/i/validation/{guest_token}', 'App\\Modules\\PublicInvitation\\PublicInvitationController@validateQr');
$router->get('/i/{workspace_slug}/{guest_token}', 'App\\Modules\\PublicInvitation\\PublicInvitationController@show');
$router->get('/{workspace_slug}/i/{guest_token}', 'App\\Modules\\PublicInvitation\\PublicInvitationController@show');

// ── GET /{workspace_slug}/livepreview — Live Preview (G014) ──────────────────
// Renders the production invitation as a standalone full page.
// No shell · No iframe · No device simulator · No toolbar.
// Auth is enforced inside LivePreviewController::show() — session validation
// against the workspace slug prevents cross-couple access.
$router->get('/{workspace_slug}/livepreview', 'App\\Modules\\PublicInvitation\\LivePreviewController@show');


// Load Guest Interaction Module routes (RSVP + Wish)
require ROOT_PATH . '/app/modules/Interaction/routes.php';
