{# Deck selector component #}
<div class="input-group mb-3">
    <select class="form-select" name="deck_name" id="deck_name" required onchange="changeDeck(this.value);">
        <option {{ '' if 'pseudo_deck' in session else 'selected' }} disabled hidden style="overflow-wrap: break-word;" name="deck_name" id="deck_name" value=""> -- choose deck --</option>
        {% for connection in history %}
            <option {{ 'selected' if session['pseudo_deck']==connection else '' }} style="overflow-wrap: break-word;" name="deck_name" id="deck_name" value="{{connection}}">{{connection.split('.')[0]}}</option>
        {% endfor %}
    </select>
</div>
<hr> 