<p class="saldo"><?= __('Your current balance is %d hours', [$balance]) ?></p>

<ul class="credit-shop">
    <?php foreach ($packages as $package): ?>
        <li style="width: 174px;">
            <p class="title"><?= $package['package'] ?></p>
            <p class="desc">
                <?php if (empty($package['image'])): ?>
                    <?= nl2br($package['description']) ?>
                <?php else: ?>
                    <img src="<?= upload_to('/profile/' . $package['image']) ?>" width="168" />
                <?php endif ?>
            </p>

            <p class="price">
                <?= $package['amount_hours'] ?> <?= __('hours') ?>
                <?php if ($package['amount_credits'] > 0): ?>
                    / <?= util('Number')->currency($package['amount_credits']) ?>
                <?php endif ?>
            </p>

            <div class="buy">
                <a data-confirm="<?= __('Are you sure you want to buy this package?') ?>" href="<?= url_to('/panel/character/' . $character->getName() . '/block-profile/buy/' . $package['id']) ?>" class="btn" data-ajax-action><?= __('Purchase') ?></a>
            </div>
        </li>
    <?php endforeach ?>
</ul>