<?php
/**
 * Download blank child member registration form (DOCX).
 */

require_once __DIR__ . '/../../includes/auth.php';
requireAuth();

if (isFinance() || isVoting()) {
    header('Location: ' . BASE_PATH . '/members');
    exit;
}

require_once __DIR__ . '/../../config/app.php';
require_once __DIR__ . '/../../includes/child-registration-docx.php';

try {
    nazareth_send_child_registration_docx();
} catch (Throwable $e) {
    http_response_code(500);
    echo 'Could not generate form: ' . htmlspecialchars($e->getMessage());
}
