<div class="mb-4">

    <h6 class="fw-semibold mb-3">
        <?php echo $this->user->lang('Select which fields you wish to export'); ?>
    </h6>

    <div class="row row-cols-1 row-cols-md-2 g-2">

        <?php foreach ($this->fields as $field) { ?>
            <div class="col">
                <div class="form-check">
                    <input
                        type="checkbox"
                        class="form-check-input"
                        id="tickets_field_<?php echo $field['inputName']; ?>"
                        name="tickets_field__<?php echo $field['inputName']; ?>"
                        <?php echo $field['checked']; ?>
                    />
                    <label class="form-check-label small"
                           for="tickets_field_<?php echo $field['inputName']; ?>">
                        <?php echo $field['fieldName']; ?>
                    </label>
                </div>
            </div>
        <?php } ?>

    </div>

</div>

<div class="mb-4 pt-3 border-top">

    <h6 class="fw-semibold text-uppercase small text-muted mb-3">
        <?php echo $this->user->lang('Filters'); ?>
    </h6>

    <div class="d-flex align-items-end gap-3 flex-wrap">

        <div>
            <label class="form-label small mb-1">
                <?php echo $this->user->lang('Ticket Status'); ?>
            </label>

            <select name="tickets_status"
                    class="normalSelect2 form-select form-select-sm"
                    style="min-width:220px;">
                <option value="all" selected>
                    <?php echo $this->user->lang('All Tickets'); ?>
                </option>
                <option value="opened">
                    <?php echo $this->user->lang('Only Open Tickets'); ?>
                </option>
                <option value="closed">
                    <?php echo $this->user->lang('Only Closed Tickets'); ?>
                </option>
            </select>
        </div>

        <div>
            <button class="cm-btns orange" id="exportButton">
                <?php echo $this->user->lang("Download .csv"); ?>
            </button>
        </div>

    </div>

</div>
