<?php
$rows = $block->rows()->toStructure();
if ($rows->isNotEmpty()) :?>
    <table class="table <?= e($block->striped()->toBool(), 'table-striped') ?>">
        <?php if($block->showheader()->toBool()) : ?>
        <thead>
            <tr>
                <th><?= $block->leftheader() ?></th>
                <th><?= $block->rightheader() ?></th>
            </tr>
        </thead>
        <?php endif; ?>
        <tbody>
            <?php foreach ($rows as $row) : ?>
                <tr>
                    <td><?= $row->topic() ?></td>
                    <td><?= $row->description() ?></td>
                </tr>
            <?php endforeach ?>
        </tbody>
    </table>
<?php endif; ?>