<q-tab-panel name="funding">
  <q-card-section class="q-pa-none">
    <h6 class="q-my-none">Wallets Management</h6>
    <br />
    <div>
      <div class="row">
        <div class="col">
          <p>Funding Source Info</p>
          <ul>
            {%raw%}
            <li>Funding Source: {{settings.lnbits_backend_wallet_class}}</li>
            <li>Balance: {{balance / 1000}} sats</li>
            {%endraw%}
          </ul>
          <br />
        </div>
      </div>
      <div class="row q-col-gutter-md">
        <div class="col-12 col-md-6">
          <div class="row">
            <div class="col-12">
              <p>Active Funding<small> (Requires server restart)</small></p>
              <q-select
                :disable="!isSuperUser"
                filled
                v-model="formData.lnbits_backend_wallet_class"
                hint="Select the active funding wallet"
                :options="settings.lnbits_allowed_funding_sources"
              ></q-select>
            </div>
          </div>
        </div>
        <div class="col-12 col-md-6">
          <div class="col-12">
            <p>Fee reserve</p>
            <div class="row q-col-gutter-md">
              <div class="col-6">
                <q-input
                  type="number"
                  filled
                  v-model="formData.lnbits_reserve_fee_min"
                  label="Reserve fee in msats"
                >
                </q-input>
              </div>
              <div class="col-6">
                <q-input
                  type="number"
                  filled
                  name="lnbits_reserve_fee_percent"
                  v-model="formData.lnbits_reserve_fee_percent"
                  label="Reserve fee in percent"
                  step="0.1"
                ></q-input>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div v-if="isSuperUser">
        <p class="q-my-md">
          Funding Sources<small> (Requires server restart)</small>
        </p>
        <q-list
          v-for="(fund, idx) in settings.lnbits_allowed_funding_sources"
          :key="idx"
        >
          <q-expansion-item
            expand-separator
            icon="payments"
            :label="fund"
            v-if="funding_sources.get(fund)"
          >
            <q-card>
              <q-card-section
                v-for="([key, prop], i) in Object.entries(funding_sources.get(fund))"
                :key="i"
              >
                <q-input
                  dense
                  filled
                  type="text"
                  v-model="formData[key]"
                  :label="prop.label"
                  class="q-pr-md"
                  :hint="prop.hint"
                ></q-input>
              </q-card-section>
            </q-card>
          </q-expansion-item>
        </q-list>
      </div>
    </div>
  </q-card-section>
</q-tab-panel>
