<?php
/** @var array|null $result */
?>
<h1>Comparison Result</h1>
<?php if ($result): ?>
    <h2>Added Files</h2>
    <ul>
        <?php foreach ($result['added'] as $file => $hash): ?>
            <li><?= Html::encode($file) ?></li>
        <?php endforeach; ?>
    </ul>
    <h2>Removed Files</h2>
    <ul>
        <?php foreach ($result['removed'] as $file => $hash): ?>
            <li><?= Html::encode($file) ?></li>
        <?php endforeach; ?>
    </ul>
    <h2>Changed Files</h2>
    <ul>
        <?php foreach ($result['changed'] as $file => $hashes): ?>
            <li><?= Html::encode($file) ?> (Local: <?= Html::encode($hashes['local']) ?>, Remote: <?= Html::encode($hashes['remote']) ?>)</li>
        <?php endforeach; ?>
    </ul>
<?php else: ?>
    <p>No result or no file uploaded.</p>
<?php endif; ?>
