<?php
/**
 * @var $id string
 * @var $val string
 * @var $slug string
 * @var $options array
 */
if (!empty($options)) { ?>
<select name="<?= $slug ?>[<?= $id ?>]" id="<?= $slug ?>_<?= $id ?>">
    <option value=""><?= __('Select', 'auctionforge') ?></option>
    <?php foreach ($options as $key => $option) : ?>
        <option <?= selected($key, esc_attr($val)) ?> value="<?= $key ?>"><?= ucfirst($option) ?></option>
    <?php endforeach; ?>
</select>
<?php } ?>
<?php if (!empty($description)) { ?>
    <p class="description" id="<?= $id ?>-description"><?= $description ?></p>
<?php } ?>
