<?= $this->layout('_layout', ['title' => $title]); ?>

<main class="main">
    <?= $this->insert('includes/aside_info') ?>

    <div class="content">
        <div class="h2-title h2-title-content flex-s-c">
            <span>My Ads</span>
        </div>



        <ul class="_links">
            <li><a class="button" href="<?= __redirect("market/my/characters") ?>">To go back</a></li>
        </ul>

        <?php if (plugin()->market) : ?>
            <?php if ($stores) :  ?>
                <div class="information">
                    <div>
                        <table class="w-full">
                            <tbody class="bg-neutral-600">
                                <tr>
                                    <td><b>Character</b></td>
                                    <td></td>
                                </tr>
                                <?php foreach ($stores as $store) : ?>
                                    <tr class="image-view">
                                        <td><?= $store->name ?></td>
                                        <td><a class="button" href="<?= __redirect('market/remove/character/' . $store->id) ?>">Remover</a></td>
                                    </tr>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </div>

                </div>
            <?php else : ?>
                <br>
                <div class="warning">There are no characters announced at the moment</div>
            <?php endif; ?>
        <?php else : ?>
            <br>
            <div class="warning">Function disabled by administration</div>
        <?php endif; ?>
    </div>