<?= $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 Account</span>
        </div>

        <?= $this->insert('user/_user'); ?>
        <br>

        <div class="p-2 bg-neutral-200 mt-16">
            <form action="<?= __redirect("auth/exchange/coins") ?>" method="post">
                <?= __csrf(); ?>
                <div class="fields">
                    <div class="fieldGroup">
                        <span>Select your exchange<sup class="text-red-500">*</sup></span>
                        <select name="exchange" class="py-1 px-3 rounded-full border border-neutral-300 block w-full focus:outline-none focus:bg focus:bg-neutral-100">
                            <option value="">&raquo; Select the exchange below</option>
                            <?php foreach (currency['select_exchange'] as $index => $coins) : ?>
                                <option value="<?= $index ?>">&raquo; <?= $coins['coin_1'] ?> <?= coins[currency['discount']]['name_coin'] ?> = <?= coins[currency['recepient']]['name_coin'] ?> <?= $coins['coin_2'] ?></option>
                            <?php endforeach; ?>
                        </select>
                    </div>
                </div>
                <button type="submit"> Save</button>
            </form>
        </div>
    </div>
</main>