<?php ob_start(); ?>

<h2><?= __('installer.req_title') ?></h2>
<p><?= __('installer.req_text') ?></p>

<table class="requirements-table">
    <thead>
        <tr>
            <th><?= __('installer.req_col_requirement') ?></th>
            <th><?= __('installer.req_col_status') ?></th>
            <th><?= __('installer.req_col_value') ?></th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($checks as $check): ?>
        <tr>
            <td><?= e($check['label']) ?></td>
            <td>
                <span class="status-badge <?= $check['passed'] ? 'passed' : 'failed' ?>">
                    <?= $check['passed'] ? '✓' : '✗' ?>
                </span>
            </td>
            <td><?= e($check['value']) ?></td>
        </tr>
        <?php endforeach; ?>
    </tbody>
</table>

<div class="step-actions">
    <a href="/installer/step/1" class="btn btn-secondary"><?= __('installer.req_back') ?></a>
    <?php if ($allPassed): ?>
    <a href="/installer/step/3" class="btn btn-primary"><?= __('installer.req_continue') ?></a>
    <?php else: ?>
    <button class="btn btn-disabled" disabled><?= __('installer.req_fix_issues') ?></button>
    <?php endif; ?>
</div>

<?php $content = ob_get_clean(); include __DIR__ . '/layout.php'; ?>
