<?php

declare(strict_types=1);

require_once __DIR__ . '/bootstrap.php';

// Stable public entry point for release packages. App-generated distributions
// carry a signed-off mode descriptor so a demo ZIP cannot be switched to
// production and a full installer cannot bypass production licensing.
$distribution = dental_distribution_profile();
$mode = (string)($distribution['installer_mode'] ?? '');
$query = $_GET;
if (in_array($mode, ['production','demo'], true)) {
    $query['mode'] = $mode;
}
$target = 'install.php' . ($query ? '?' . http_build_query($query) : '');
header('Location: ' . $target, true, 302);
exit;
