{% extends 'base/module.twig' %}

{% block content %}

  <div class="container-fluid">

    <div class="row">

      <div class="col-xs-12">
        <div v-show="tabs[0].active">
          <div class="row">
            <div class="col-xs-12 col-sm-8">
              <base-card class="padding-large">

                <div class="bottom-margin-large">
                  <span class="text-small text-dark text-bold visible-block">{ text_notification }</span>
                  <span class="text-small text-gray visible-block bottom-margin-small text-word-wrap">{ url_callback }</span>
                  <base-button
                    apperance="outline"
                    size="small"
                    @click.native="copyLink()"
                  >
                    { textCopy }
                  </base-button>
                </div>

                <validation-provider
                  tag="div"
                  rules="required"
                  name="getnet_seller_id"
                  v-slot="{ errors, valid }">
                  <base-input
                    :label="text_seller_id"
                    name="getnet_seller_id"
                    v-model="configurations.getnet_seller_id"
                    :error="errors[0]"
                    :valid="valid"
                    required>
                  </base-input>
                </validation-provider>

                <validation-provider
                  tag="div"
                  rules="required"
                  class="top-margin-large"
                  name="getnet_client_id"
                  v-slot="{ errors, valid }">
                  <base-input
                    :label="text_client_id"
                    name="getnet_client_id"
                    v-model="configurations.getnet_client_id"
                    :error="errors[0]"
                    :valid="valid"
                    required>
                  </base-input>
                </validation-provider>

                <validation-provider
                  tag="div"
                  rules="required"
                  class="top-margin-large"
                  name="getnet_client_secret"
                  v-slot="{ errors, valid }">
                  <base-input
                    :label="text_client_secret"
                    name="getnet_client_secret"
                    v-model="configurations.getnet_client_secret"
                    :error="errors[0]"
                    :valid="valid"
                    required>
                  </base-input>
                </validation-provider>

                <div class="flex flex-row end-xs">
                  <base-button
                    class="top-margin-large"
                    :loading="loadingBtn"
                    @click.native="() => validateCredentials(url_validate_credentials)">
                    {text_authenticate}
                  </base-button>
                </div>

              </base-card>
            </div>
            <div class="col-xs-12 col-sm-4">
              <base-card class="padding-large">

                <validation-provider
                  tag="div"
                  rules="required"
                  name="getnet_status"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_status"
                    name="getnet_status"
                    v-model="configurations.getnet_status"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(value, key) in Type_Status"
                      :key="key"
                      :value="key">
                      { value }
                    </option>
                  </base-select>
                </validation-provider>

                <validation-provider
                  tag="div"
                  rules="required"
                  class="top-margin-large"
                  name="getnet_ambiente"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_environment"
                    name="getnet_ambiente"
                    v-model="configurations.getnet_ambiente"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(value, key) in Type_Environment"
                      :key="key"
                      :value="key">
                      { value }
                    </option>
                  </base-select>
                </validation-provider>

                <validation-provider
                  tag="div"
                  rules="required"
                  class="top-margin-large"
                  name="getnet_display"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_display_in"
                    name="getnet_display"
                    v-model="configurations.getnet_display"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(value, key) in Type_DisplayModuleOption"
                      :key="key"
                      :value="key">
                      { value }
                    </option>
                  </base-select>
                </validation-provider>

                <validation-provider
                  tag="div"
                  rules="required"
                  class="top-margin-large"
                  name="getnet_log_error"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_log_error"
                    name="getnet_log_error"
                    v-model="configurations.getnet_log_error"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(value, key) in Type_Status"
                      :key="key"
                      :value="key">
                      { value }
                    </option>
                  </base-select>
                </validation-provider>

                <validation-provider
                  tag="div"
                  class="top-margin-large"
                  name="getnet_order"
                  v-slot="{ errors, valid }">
                  <base-input
                    :label="text_order"
                    name="getnet_order"
                    v-model="configurations.getnet_order"
                    mask="integer"
                    :error="errors[0]"
                    :valid="valid">
                  </base-input>
                </validation-provider>

                <validation-provider
                  tag="div"
                  rules="required"
                  class="top-margin-large"
                  name="getnet_region"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_region"
                    name="getnet_region"
                    v-model="configurations.getnet_region"
                    :error="errors[0]"
                    :valid="valid">
                    <option value="0">{ text_all }</option>
                    <option
                      v-for="(geo_zone, key) in geo_zones"
                      :key="geo_zone.geo_zone_id"
                      :value="geo_zone.geo_zone_id">
                      { geo_zone.name }
                    </option>
                  </base-select>
                </validation-provider>
              </base-card>
            </div>
          </div>
        </div>

        <div v-show="tabs[1].active">
          <div class="row">
            <div class="col-xs-12 col-sm-8">
              <base-card class="padding-large">

                <validation-provider
                  tag="div"
                  name="getnet_order_status_replicar"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_status_replicar"
                    name="getnet_order_status_replicar"
                    v-model="configurations.getnet_order_status_replicar"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(order_status, key) in order_statuses"
                      :key="order_status.order_status_id"
                      :value="order_status.order_status_id">
                      { order_status.name }
                    </option>
                  </base-select>
                </validation-provider>

                <validation-provider
                  tag="div"
                  class="top-margin-large"
                  name="getnet_order_status_pending"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_waiting_payment"
                    name="getnet_order_status_pending"
                    v-model="configurations.getnet_order_status_pending"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(order_status, key) in order_statuses"
                      :key="order_status.order_status_id"
                      :value="order_status.order_status_id">
                      { order_status.name }
                    </option>
                  </base-select>
                </validation-provider>

                <validation-provider
                  tag="div"
                  class="top-margin-large"
                  name="getnet_order_status_approved"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_approved"
                    name="getnet_order_status_approved"
                    v-model="configurations.getnet_order_status_approved"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(order_status, key) in order_statuses"
                      :key="order_status.order_status_id"
                      :value="order_status.order_status_id">
                      { order_status.name }
                    </option>
                  </base-select>
                </validation-provider>

                <validation-provider
                  tag="div"
                  class="top-margin-large"
                  name="getnet_order_status_paid"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_paid"
                    name="getnet_order_status_paid"
                    v-model="configurations.getnet_order_status_paid"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(order_status, key) in order_statuses"
                      :key="order_status.order_status_id"
                      :value="order_status.order_status_id">
                      { order_status.name }
                    </option>
                  </base-select>
                </validation-provider>

                <validation-provider
                  tag="div"
                  class="top-margin-large"
                  name="getnet_order_status_reproved"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_reproved"
                    name="getnet_order_status_reproved"
                    v-model="configurations.getnet_order_status_reproved"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(order_status, key) in order_statuses"
                      :key="order_status.order_status_id"
                      :value="order_status.order_status_id">
                      { order_status.name }
                    </option>
                  </base-select>
                </validation-provider>

                <validation-provider
                  tag="div"
                  class="top-margin-large"
                  name="getnet_order_status_canceled"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_canceled"
                    name="getnet_order_status_canceled"
                    v-model="configurations.getnet_order_status_canceled"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(order_status, key) in order_statuses"
                      :key="order_status.order_status_id"
                      :value="order_status.order_status_id">
                      { order_status.name }
                    </option>
                  </base-select>
                </validation-provider>

                <validation-provider
                  tag="div"
                  class="top-margin-large"
                  name="getnet_order_status_error"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_error"
                    name="getnet_order_status_error"
                    v-model="configurations.getnet_order_status_error"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(order_status, key) in order_statuses"
                      :key="order_status.order_status_id"
                      :value="order_status.order_status_id">
                      { order_status.name }
                    </option>
                  </base-select>
                </validation-provider>

                <validation-provider
                  tag="div"
                  class="top-margin-large"
                  name="getnet_order_status_denied"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_denied"
                    name="getnet_order_status_denied"
                    v-model="configurations.getnet_order_status_denied"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(order_status, key) in order_statuses"
                      :key="order_status.order_status_id"
                      :value="order_status.order_status_id">
                      { order_status.name }
                    </option>
                  </base-select>
                </validation-provider>

              </base-card>
            </div>
          </div>
        </div>

        <div v-show="tabs[2].active">
          <div class="row">

            <div class="col-xs-12 col-sm-4 last-md">
              <base-card class="padding-large">

                <validation-provider
                  tag="div"
                  name="getnet_discount"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_discount"
                    name="getnet_discount"
                    v-model="configurations.getnet_discount"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(value, key) in Type_Status"
                      :key="key"
                      :value="key">
                      { value }
                    </option>
                  </base-select>
                </validation-provider>

                <validation-provider
                  tag="div"
                  class="top-margin-large"
                  name="getnet_discount_order"
                  v-slot="{ errors, valid }">
                  <base-input
                    :label="text_order_discount"
                    name="getnet_discount_order"
                    v-model="configurations.getnet_discount_order"
                    mask="integer"
                    :error="errors[0]"
                    :valid="valid">
                  </base-input>
                </validation-provider>

              </base-card>
            </div>

            <div class="col-xs-12 bottom-padding-x-small">
              <div class="content-box">
                <span class="text-x-large text-dark visible-block">{{ text_billet }}</span>
              </div>
            </div>

            <div class="col-xs-12 col-sm-8">
{#              <base-card class="padding-large">#}

{#                <validation-provider#}
{#                  tag="div"#}
{#                  name="getnet_pix_status"#}
{#                  v-slot="{ errors, valid }">#}
{#                  <base-checkbox#}
{#                    :label="text_pix"#}
{#                    name="getnet_pix_status"#}
{#                    v-model="configurations.getnet_pix.status"#}
{#                    value="1"#}
{#                    unchecked-value="0">#}
{#                  </base-checkbox>#}
{#                </validation-provider>#}

{#                <validation-provider#}
{#                  tag="div"#}
{#                  class="top-margin-large"#}
{#                  name="getnet_pix_title"#}
{#                  v-slot="{ errors, valid }">#}
{#                  <base-input#}
{#                    :label="text_title"#}
{#                    name="getnet_pix_title"#}
{#                    v-model="configurations.getnet_pix.title"#}
{#                    :error="errors[0]"#}
{#                    :valid="valid">#}
{#                  </base-input>#}
{#                </validation-provider>#}

{#                <div class="row small-space-xs bottom-xs top-margin-large">#}

{#                  <validation-provider#}
{#                    tag="div"#}
{#                    class="col-xs"#}
{#                    name="getnet_pix_valor_minimo"#}
{#                    v-slot="{ errors, valid }">#}
{#                    <base-input#}
{#                      :label="text_min_value"#}
{#                      name="getnet_pix_valor_minimo"#}
{#                      v-model="configurations.getnet_pix.valor_minimo"#}
{#                      :error="errors[0]"#}
{#                      :valid="valid">#}
{#                    </base-input>#}
{#                  </validation-provider>#}

{#                  <validation-provider#}
{#                    tag="div"#}
{#                    class="col-xs"#}
{#                    name="getnet_pix_desconto"#}
{#                    v-slot="{ errors, valid }">#}
{#                    <base-input#}
{#                      :label="text_discount"#}
{#                      name="getnet_pix_desconto"#}
{#                      v-model="configurations.getnet_pix.desconto"#}
{#                      :error="errors[0]"#}
{#                      :valid="valid">#}
{#                    </base-input>#}
{#                  </validation-provider>#}

{#                  <validation-provider#}
{#                    tag="div"#}
{#                    class="col-xs"#}
{#                    name="getnet_pix_tipo_desconto"#}
{#                    v-slot="{ errors, valid }">#}
{#                    <base-select#}
{#                      name="getnet_pix_tipo_desconto"#}
{#                      :label="text_discount_type"#}
{#                      v-model="configurations.getnet_pix.tipo_desconto"#}
{#                      :valid="valid"#}
{#                      :error="errors[0]">#}
{#                      <option#}
{#                        v-for="(value, key) in Type_MarketplaceAdjustmentPrice"#}
{#                        :key="key"#}
{#                        :value="key">#}
{#                        { value }#}
{#                      </option>#}
{#                    </base-select>#}
{#                  </validation-provider>#}
{#                </div>#}
{#              </base-card>#}

              <base-card class="padding-large">

                <validation-provider
                  tag="div"
                  name="getnet_billet_status"
                  v-slot="{ errors, valid }">
                  <base-checkbox
                    :label="text_billet"
                    name="getnet_billet_status"
                    v-model="configurations.getnet_billet.status"
                    value="1"
                    unchecked-value="0">
                  </base-checkbox>
                </validation-provider>

                <validation-provider
                  tag="div"
                  class="top-margin-large"
                  name="getnet_billet_title"
                  v-slot="{ errors, valid }">
                  <base-input
                    :label="text_title"
                    name="getnet_billet_title"
                    v-model="configurations.getnet_billet.title"
                    :error="errors[0]"
                    :valid="valid">
                  </base-input>
                </validation-provider>

                <div class="row small-space-xs bottom-xs top-margin-large">

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    name="getnet_billet_valor_minimo"
                    v-slot="{ errors, valid }">
                    <base-input
                      :label="text_min_value"
                      name="getnet_billet_valor_minimo"
                      v-model="configurations.getnet_billet.valor_minimo"
                      mask="brazilCurrency"
                      :error="errors[0]"
                      :valid="valid">
                    </base-input>
                  </validation-provider>

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    rules="numeric"
                    name="getnet_billet_validade"
                    v-slot="{ errors, valid }">
                    <base-input
                      :label="text_validity"
                      name="getnet_billet_validade"
                      v-model="configurations.getnet_billet.validade"
                      mask="positiveInteger"
                      :error="errors[0]"
                      :valid="valid">
                    </base-input>
                  </validation-provider>

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    name="getnet_billet_desconto"
                    v-slot="{ errors, valid }">
                    <base-input
                      :label="text_discount"
                      name="getnet_billet_desconto"
                      v-model="configurations.getnet_billet.desconto"
                      :disabled="!parseBoolean(configurations.getnet_discount)"
                      :mask="getnetDescontoBoleto"
                      :error="errors[0]"
                      :valid="valid">
                    </base-input>
                  </validation-provider>

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    name="getnet_billet_tipo_desconto"
                    v-slot="{ errors, valid }">
                    <base-select
                      name="getnet_billet_tipo_desconto"
                      :label="text_discount_type"
                      v-model="configurations.getnet_billet.tipo_desconto"
                      :disabled="!parseBoolean(configurations.getnet_discount)"
                      :valid="valid"
                      :error="errors[0]">
                      <option
                        v-for="(value, key) in Type_MarketplaceAdjustmentPrice"
                        :key="key"
                        :value="key">
                        { value }
                      </option>
                    </base-select>
                  </validation-provider>
                </div>
              </base-card>

              {# Informações de pagamento com PIX #}

              <div class="col-xs-12 bottom-padding-x-small">
                <div class="content-box">
                  <span class="text-x-large text-dark visible-block">{{ text_pix }}</span>
                </div>
              </div>
              <base-card class="padding-large top-margin-large">
                <validation-provider
                  tag="div"
                  name="getnet_pix_status"
                  v-slot="{ errors, valid }">
                  <base-checkbox
                    :label="text_pix"
                    name="getnet_pix_status"
                    v-model="configurations.getnet_pix.status"
                    value="1"
                    unchecked-value="0">
                  </base-checkbox>
                </validation-provider>

                <validation-provider
                  tag="div"
                  name="getnet_pix_title"
                  :rules="configurations.getnet_pix.status == 1  ? 'required': ''"
                  v-slot="{ errors, valid }">
                  <base-input
                    :label="text_title"
                    name="getnet_pix_title"
                    mask="alphanumeric"
                    maxlength="70"
                    v-model="configurations.getnet_pix.title"
                    :error="errors[0]"
                    :valid="valid">
                  </base-input>
                </validation-provider>
              </base-card>

              {# Informações de pagamento com Cartão de Débito #}

              <div class="col-xs-12 bottom-padding-x-small">
                <div class="content-box">
                  <span class="text-x-large text-dark visible-block">{{ text_debit_card }}</span>
                </div>
              </div>
              <base-card class="padding-large top-margin-large">
                <validation-provider
                  tag="div"
                  name="getnet_debit_card_status"
                  v-slot="{ errors, valid }">
                  <base-checkbox
                    :label="text_debit_card"
                    name="getnet_debit_card_status"
                    v-model="configurations.getnet_debit_card.status"
                    value="1"
                    unchecked-value="0">
                  </base-checkbox>
                </validation-provider>

                <validation-provider
                  tag="div"
                  name="getnet_debit_card_title"
                  :rules="configurations.getnet_debit_card.status == 1  ? 'required': ''"
                  v-slot="{ errors, valid }">
                  <base-input
                    :label="text_title"
                    name="getnet_debit_card_card_title"
                    mask="alphanumeric"
                    maxlength="70"
                    v-model="configurations.getnet_debit_card.title"
                    :error="errors[0]"
                    :valid="valid">
                  </base-input>
                </validation-provider>

                <div class="row small-space-xs bottom-xs top-margin-large">

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    name="getnet_debit_card_valor_minimo"
                    v-slot="{ errors, valid }">
                    <base-input
                      :label="text_min_value"
                      name="getnet_debit_card_valor_minimo"
                      v-model="configurations.getnet_debit_card.valor_minimo"
                      mask="brazilCurrency"
                      :error="errors[0]"
                      :valid="valid">
                    </base-input>
                  </validation-provider>

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    name="getnet_debit_card_desconto"
                    v-slot="{ errors, valid }">
                    <base-input
                      :label="text_discount"
                      name="getnet_debit_card_desconto"
                      :mask="getnetDescontoDebit"
                      v-model="configurations.getnet_debit_card.desconto"
                      :error="errors[0]"
                      :valid="valid">
                    </base-input>
                  </validation-provider>

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    name="getnet_debit_card_tipo_desconto"
                    v-slot="{ errors, valid }">
                    <base-select
                      name="getnet_debit_card_tipo_desconto"
                      :label="text_discount_type"
                      v-model="configurations.getnet_debit_card.tipo_desconto"
                      :valid="valid"
                      :error="errors[0]">
                      <option
                        v-for="(value, key) in Type_MarketplaceAdjustmentPrice"
                        :key="key"
                        :value="key">
                        { value }
                      </option>
                    </base-select>
                  </validation-provider>
                </div>

                <div v-for="(value, key) in configurations.getnet_debit_card.brands" :key="key" class="row small-space-xs bottom-xs top-margin-small bottom-border-gray">
                  <div class="top-margin-large bottom-padding-small col-xs-12">
                    <validation-provider
                      tag="div"
                      :name=`getnet_status_${value.status}`
                      v-slot="{ errors, valid }">
                      <base-checkbox
                        class="text-capitalize"
                        :label="value.descricao"
                        :name=`getnet_status_${value.descricao}`
                        v-model="configurations.getnet_debit_card.brands[key].status"
                        :checked="value.status"
                        value="1"
                        unchecked-value="0">
                      </base-checkbox>
                    </validation-provider>
                  </div>
                </div>
              </base-card>

              <span class="text-x-large text-dark visible-block top-margin-large bottom-margin-medium">{{ text_credit_card }}</span>

              <base-card class="padding-large top-margin-large">

                <validation-provider
                  tag="div"
                  name="getnet_credit_card_title"
                  v-slot="{ errors, valid }">
                  <base-input
                    :label="text_title"
                    name="getnet_credit_card_title"
                    v-model="configurations.getnet_credit_card_title"
                    :error="errors[0]"
                    :valid="valid">
                  </base-input>
                </validation-provider>

                <div class="row small-space-xs bottom-xs top-margin-large">

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    name="getnet_credit_card_parcela_minima"
                    v-slot="{ errors, valid }">
                    <base-input
                      :label="text_installment_min_value"
                      name="getnet_credit_card_parcela_minima"
                      v-model="configurations.getnet_parcela_minima"
                      mask="brazilCurrency"
                      :error="errors[0]"
                      :valid="valid">
                    </base-input>
                  </validation-provider>

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    rules="required"
                    name="getnet_parcela_qtdmax"
                    v-slot="{ errors, valid }">
                    <base-input
                      :label="text_installments_qty_max"
                      name="getnet_parcela_qtdmax"
                      v-model="configurations.getnet_parcela_qtdmax"
                      mask="positiveInteger"
                      :error="errors[0]"
                      :valid="valid"
                      required>
                    </base-input>
                  </validation-provider>

                  <validation-provider
                    tag="div"
                    :class="(configurations.getnet_config_parcelamento == Type_ConfigParcelamento.PorParcela) ? 'hidden' : 'col-xs'"
                    name="getnet_credit_card_porcentagem_juros"
                    v-slot="{ errors, valid }">
                    <base-input
                      :label="text_interest"
                      name="getnet_credit_card_porcentagem_juros"
                      v-model="configurations.getnet_parcela_juros"
                      mask="percentage"
                      :error="errors[0]"
                      :valid="valid">
                    </base-input>
                  </validation-provider>
                </div>

                <div class="row small-space-xs bottom-xs top-margin-large">

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    name="getnet_credit_card_config_parcelamento"
                    v-slot="{ errors, valid }">
                    <base-select
                      name="getnet_credit_card_config_parcelamento"
                      :label="text_installment_config_type"
                      v-model="configurations.getnet_config_parcelamento"
                      :valid="valid"
                      :error="errors[0]">
                      <option
                        v-for="(value, key) in Type_ConfigParcelamento.getEnumList()"
                        :key="key"
                        :value="key">
                        { value }
                      </option>
                    </base-select>
                  </validation-provider>

                </div>

                <div v-if="(configurations.getnet_config_parcelamento == Type_ConfigParcelamento.Padrao)"
                     class="row small-space-xs bottom-xs top-margin-large">

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    name="getnet_credit_card_parcela_comdesconto"
                    v-slot="{ errors, valid }">
                    <base-input
                      :label="text_installments_with_discount"
                      name="getnet_credit_card_parcela_comdesconto"
                      v-model="configurations.getnet_parcela_comdesconto"
                      mask="positiveInteger"
                      :error="errors[0]"
                      :valid="valid">
                    </base-input>
                  </validation-provider>

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    name="getnet_credit_card_parcela_desconto"
                    v-slot="{ errors, valid }">
                    <base-input
                      :label="text_discount_number"
                      name="getnet_credit_card_parcela_desconto"
                      v-model="configurations.getnet_parcela_desconto"
                      mask="percentage"
                      :error="errors[0]"
                      :valid="valid">
                    </base-input>
                  </validation-provider>

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    name="getnet_credit_card_parcela_semjuros"
                    v-slot="{ errors, valid }">
                    <base-input
                      :label="text_installments_without_interest"
                      name="getnet_credit_card_parcela_semjuros"
                      v-model="configurations.getnet_parcela_semjuros"
                      mask="positiveInteger"
                      :error="errors[0]"
                      :valid="valid">
                    </base-input>
                  </validation-provider>

                </div>

                <div v-if="(configurations.getnet_config_parcelamento == Type_ConfigParcelamento.PorParcela)"
                     v-for="(value, keyParcela) in configurations.getnet_parcelamento_configs"
                     class="row small-space-xs bottom-xs top-margin-large">

                  <div class="col-xs-12">
                    <span class="field-label">{text_parcela} {keyParcela+1}: </span>
                  </div>

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    :name=`configurations.getnet_parcelamento_configs[${keyParcela}].val_minimo`
                    v-slot="{ errors, valid }">
                    <base-input
                      :label="text_installment_min_total"
                      :name=`configurations.getnet_parcelamento_configs[${keyParcela}].val_minimo`
                      v-model="configurations.getnet_parcelamento_configs[keyParcela].val_minimo"
                      mask="brazilCurrency"
                      :error="errors[0]"
                      :valid="valid">
                    </base-input>
                  </validation-provider>

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    :name=`configurations.getnet_parcelamento_configs[${keyParcela}].tipo_calculo`
                    v-slot="{ errors, valid }">
                    <base-select
                      :name=`configurations.getnet_parcelamento_configs[${keyParcela}].tipo_calculo`
                      :label="text_installment_calc_type"
                      v-model="configurations.getnet_parcelamento_configs[keyParcela].tipo_calculo"
                      :valid="valid"
                      :error="errors[0]">
                      <option
                        v-for="(value, key) in Type_CalculoParcelamento.getEnumList()"
                        :key="key"
                        :value="key">
                        { value }
                      </option>
                    </base-select>
                  </validation-provider>

                  <validation-provider
                    tag="div"
                    class="col-xs"
                    :name=`configurations.getnet_parcelamento_configs[${keyParcela}].percentual_calculo`
                    v-slot="{ errors, valid }">
                    <base-input
                      :label="text_installment_percent"
                      :name=`configurations.getnet_parcelamento_configs[${keyParcela}].percentual_calculo`
                      v-model="configurations.getnet_parcelamento_configs[keyParcela].percentual_calculo"
                      mask="percentage"
                      :error="errors[0]"
                      :valid="valid">
                    </base-input>
                  </validation-provider>

                </div>

                <div v-for="(value, key) in configurations.getnet_credit_card" :key="key" class="row small-space-xs bottom-xs top-margin-small bottom-border-gray">
                  <div class="top-margin-large bottom-padding-small col-xs-12">
                    <validation-provider
                      tag="div"
                      :name=`getnet_status_${value.descricao}`
                      v-slot="{ errors, valid }">
                      <base-checkbox
                        class="text-capitalize"
                        :label="value.descricao"
                        :name=`getnet_status_${value.descricao}`
                        v-model="configurations.getnet_credit_card[key].status"
                        :checked="value.status"
                        value="1"
                        unchecked-value="0">
                      </base-checkbox>
                    </validation-provider>
                  </div>



                  <div v-if="(configurations.getnet_config_parcelamento == Type_ConfigParcelamento.PorBandeira)"
                       class="row small-space-xs bottom-xs col-xs">
                    <validation-provider
                      tag="div"
                      class="col-xs"
                      :name=`getnet_valor_minimo_${value.descricao}`
                      v-slot="{ errors, valid }">
                      <base-input
                        :label="text_min_value"
                        :name=`getnet_valor_minimo_${value.descricao}`
                        v-model="configurations.getnet_credit_card[key].valor_minimo"
                        mask="brazilCurrency"
                        :error="errors[0]"
                        :valid="valid">
                      </base-input>
                    </validation-provider>

                    <validation-provider
                      tag="div"
                      class="col-xs"
                      :name=`getnet_total_parcela_${value.descricao}`
                      v-slot="{ errors, valid }">
                      <base-select
                        :name=`getnet_total_parcela_${value.descricao}`
                        :label="text_installments_total"
                        v-model="configurations.getnet_credit_card[key].total_parcela"
                        :valid="valid"
                        :error="errors[0]">
                        <option
                          v-for="index in 12"
                          :key="index"
                          :value="index">
                          { index + 'x' }
                        </option>
                      </base-select>
                    </validation-provider>

                    <validation-provider
                      tag="div"
                      class="col-xs"
                      :name=`getnet_parcela_juros_interest_${value.descricao}`
                      v-slot="{ errors, valid }">
                      <base-select
                        :name=`getnet_parcela_juros_${value.descricao}`
                        :label="text_installments_without_interest"
                        v-model="configurations.getnet_credit_card[key].parcela_juros"
                        :valid="valid"
                        :error="errors[0]">
                        <option
                          v-for="index in 12"
                          :key="index"
                          :value="index">
                          { index + 'x' }
                        </option>
                      </base-select>
                    </validation-provider>

                  </div>
                </div>

              </base-card>
            </div>

          </div>
        </div>

      </div>
    </div>

  </div>

{% endblock %}