{{ header }}
<div id="root">
  <div class="page-loader" v-show="isLoading"></div>
  <validation-observer ref="validationObserver" tag="div" v-slot="{ handleSubmit }">
    <form
      ref="form"
      @submit.prevent="handleSubmit(onSubmit)"
      action="{{ data.action }}"
      method="post">

      <the-header
        title="{{ heading_title }}"
        :breadcrumbs='{{ breadcrumbs|json_encode() }}'>

        <base-button
          href="{{ data.back }}"
          apperance="outline">
          {{ button_cancel }}
        </base-button>
        <base-button
          type="submit"
          :disabled="disableForm"
          :loading="btnSubmitLoading">
          {{ button_save }}
        </base-button>

        <template #notification>
          <base-alert
            v-show="alert.type"
            :apperance="alert.type"
            @close="alert = {}">
            <span v-text="alert.message"></span>
          </base-alert>
        </template>
      </the-header>

      <div class="container-fluid">
        <div class="row">
          <div class="col-xs-12 col-sm-8 col-md-6">
            <base-card class="padding-large">

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

              <validation-provider
                tag="div"
                name="jadlog_transport_cnpj"
                class="top-margin-large"
                rules="required|cnpj"
                v-slot="{ errors, valid }">
                <base-input
                  label="{{ entry_cnpj }}"
                  name="jadlog_transport_cnpj"
                  v-model="configurations.jadlog_transport_cnpj"
                  mask="cnpj"
                  :error="errors[0]"
                  :valid="valid"
                  :disabled="disableForm"
                  required>
                </base-input>
              </validation-provider>

              <validation-provider
                tag="div"
                name="jadlog_transport_cep"
                class="top-margin-large"
                rules="required|cep"
                v-slot="{ errors, valid }">
                <base-input
                  label="{{ entry_cep }}"
                  name="jadlog_transport_cep"
                  v-model="configurations.jadlog_transport_cep"
                  mask="cep"
                  :error="errors[0]"
                  :valid="valid"
                  :disabled="disableForm"
                  required>
                </base-input>
              </validation-provider>

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

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

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

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

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

              <base-select
                class="top-margin-large"
                label="{{ entry_modalidade }}"
                name="jadlog_transport_mod"
                v-model="configurations.jadlog_transport_mod"
                :disabled="disableForm">
                {% for  key, value in Type_ModJadlog %}
                  <option value="{{ key }}">{{ value }}</option>
                {% endfor %}
              </base-select>

              <base-select
                class="top-margin-large"
                label="{{ entry_tipo_entrega }}"
                name="jadlog_transport_tipo_entrega"
                v-model="configurations.jadlog_transport_tipo_entrega"
                :disabled="disableForm">
                {% for  key, value in Type_JadlogEntrega %}
                  <option value="{{ key }}">{{ value }}</option>
                {% endfor %}
              </base-select>

              <base-select
                class="top-margin-large"
                label="{{ entry_tipo_seguro }}"
                name="jadlog_transport_tipo_seguro"
                v-model="configurations.jadlog_transport_tipo_seguro"
                :disabled="disableForm">
                {% for  key, value in Type_JadlogSeguro %}
                  <option value="{{ key }}">{{ value }}</option>
                {% endfor %}
              </base-select>

              <base-select
                class="top-margin-large"
                label="{{ entry_frap }}"
                name="jadlog_transport_frap"
                v-model="configurations.jadlog_transport_frap"
                :disabled="disableForm">
                {% for  key, value in Type_DsDn %}
                  <option value="{{ key }}">{{ value }}</option>
                {% endfor %}
              </base-select>

              <base-select
                class="top-margin-large"
                label="{{ entry_geo_zone }}"
                name="jadlog_transport_geo_zone_id"
                v-model="configurations.jadlog_transport_geo_zone_id"
                :disabled="disableForm">
                <option value="0">{{ text_all_zones }}</option>
                {% for geo_zone in geo_zones %}
                  <option value="{{ geo_zone.geo_zone_id }}">{{ geo_zone.name }}</option>
                {% endfor %}
              </base-select>
            </base-card>
          </div>

          <div class="col-xs-12 col-sm-4">
            <base-card class="padding-large">
              <base-select
                label="{{ entry_status }}"
                name="jadlog_transport_status"
                v-model="configurations.jadlog_transport_status"
                :disabled="disableForm">
                <option value="1">{{ text_enabled }}</option>
                <option value="0">{{ text_disabled }}</option>
              </base-select>

              <validation-provider
                tag="div"
                name="jadlog_transport_sort_order"
                class="top-margin-large"
                rules="numeric"
                v-slot="{ errors, valid }">
                <base-input
                  label="{{ entry_sort_order }}"
                  name="jadlog_transport_sort_order"
                  v-model="configurations.jadlog_transport_sort_order"
                  mask="integer"
                  :error="errors[0]"
                  :valid="valid"
                  :disabled="disableForm">
                </base-input>
              </validation-provider>
            </base-card>
          </div>

        </div>
      </div>
    </form>
  </validation-observer>
</div>


<script>
  const DATA = {{ data|json_encode() }};
</script>

{{ footer }}
