<div class="modal-header">
    <div class="_title d-flex align-items-center">
        <a href="" data-bs-dismiss="modal" class="close">
            <i class="fa fa-times"></i>
        </a>
        <h2>Tarik Saldo</h2>
    </div>
</div>
<div class="modal-body pt-4">
    <div class="row mb-3">
        <div class="col-sm-4 mb-2">
            <strong>Rekening Tujuan</strong>
            <div>
                <small class="text-muted">
                    Pilih rekening tujuan
                </small>
            </div>
        </div>
        <div class="col-sm-8">
            <select name="bank" class="form-select select2-tarik">
                <option value="">Pilih</option>
                <?php 
                    foreach($rek as $item) {
                        echo '
                            <option value="'.$item -> token.'">
                            '.$item -> nama_bank.' - '.$item -> norek.'
                            </option>
                        ';
                    }
                ?>
            </select>
            <div class="select2_dropdown"></div>
        </div>
    </div>
    <div class="row mb-3">
        <div class="col-sm-4 mb-2">
            <strong>Nominal</strong>
            <div>
                <small class="text-muted">
                    Masukan nominal penarikan
                </small>
            </div>
        </div>
        <div class="col-sm-8">
            <div class="input-group">
                <span class="input-group-text">
                    Rp
                </span>
                <input type="text" name="nominal" class="form-control nf">
            </div>
        </div>
    </div>

    <div class="mt-5">
        <button class="btn btn-lg btn-primary w-100 py-3 btn_submit_wd">
            <strong>
                <i class="fa fa-credit-card me-1"></i>
                Tarik Saldo
            </strong>
        </button>
    </div>
</div>

<script>
    $('.select2-tarik').select2({
        theme: 'bootstrap-5',
        dropdownParent: $('.select2-tarik').next()
    })
</script>