<h1 class="title"><?= __('Packages shop') ?></h1>

<ul class="breadcrumber">
    <li><a href="<?= url_to('/') ?>" data-ajax><?= __('Home') ?></a></li>
    <li><a href="<?= url_to('/packages') ?>" data-ajax><?= __('Packages') ?></a></li>
    <li><a href="<?= url_to('/packages/' . $category['id']) ?>" data-ajax><?= $category['name'] ?></a></li>
    <li class="active"><?= $package['package'] ?></li>
</ul>

<?= nl2br($package['description']) ?>

<?php if (!empty($items)): ?>
    <h2 class="title" style="margin-bottom:0;margin-top:20px;"><?= __('Items') ?></h2>
    <div class="credit-shop-items">
        <?php foreach ($items as $index => $item): ?>
            <div class="item" id="item-<?= $index ?>">
                <div class="name">
                    <?php if ($item['quantity'] > 1): ?>
                        <span class="quantity"><?= $item['quantity'] ?>x</span>
                    <?php endif ?>
                    <?= util('Item')->getFullName($item['item']) ?>
                </div>
                <div class="image" data-tooltip data-tooltip-url="<?= tooltip_url($item['item']->getHex()) ?>">
                    <img src="<?= util('Item')->image($item['item']->getSection(), $item['item']->getIndex()) ?>" />
                </div>
            </div>
        <?php endforeach ?>

        <div class="clear"></div>
    </div>
<?php endif ?>

<div class="text-center" style="margin-top:20px;">
    <a data-confirm="<?= __('Are you sure you want to buy this package?') ?>" href="<?= url_to('/packages/buy/' . $package['id']) ?>" class="btn btn-sm btn-default" data-ajax-action><?= __('Purchase') ?></a>
</div>