{% 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">

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

                    name="kangu_declaracao_conteudo"
                    v-model="configurations.kangu_declaracao_conteudo"
                    :error="errors[0]"
                    :valid="valid">
                    <option
                      v-for="(value, key) in Type_DsimDnao"
                      :key="key"
                      :value="key">
                      { value }
                    </option>
                  </base-select>
                </validation-provider>

              </base-card>

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

                <base-vue-toggles
                  :label="entry_tracking"
                  :description="text_tracking_status"
                  :position="1"
                  :width="50"
                  :slider-top="true"
                  name="kangu_tracking_status"
                  col-toggles="col-xs-2"
                  v-model="configurations.kangu_tracking_status"
                >
                </base-vue-toggles>
                <hr class="bottom-border-gray vertical-margin-large">

                <base-vue-toggles
                  :label="entry_inStore"
                  :description="text_inStore"
                  :position="1"
                  :width="50"
                  :slider-top="true"
                  name="kangu_inShop"
                  col-toggles="col-xs-2"
                  v-model="configurations.kangu_inShop"
                >
                </base-vue-toggles>

              </base-card>

            </div>

            <div class="col-xs-12 col-sm-4">
              <base-card class="padding-large">
                <validation-provider
                  tag="div"
                  rules="required"
                  name="kangu_status"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="entry_situation"
                    name="kangu_status"
                    v-model="configurations.kangu_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"
                  class="top-margin-large"
                  rules="required"
                  name="kangu_environment"
                  v-slot="{ errors, valid }">
                  <base-select
                    :label="text_environment"
                    name="kangu_environment"
                    v-model="configurations.kangu_environment"
                    :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"
                  class="top-margin-large"
                  rules="required"
                  name="kangu_sort_order"
                  v-slot="{ errors, valid }">
                  <base-input
                    :label="entry_sort_order"
                    name="kangu_sort_order"
                    v-model="configurations.kangu_sort_order"
                    mask="integer"
                    :error="errors[0]"
                    :valid="valid">
                  </base-input>
                </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"
                  rules="required|cep"
                  class="top-margin-large"
                  name="kangu_postcode"
                  v-slot="{ errors, valid }">
                  <base-input
                    :label="entry_postcode"
                    name="kangu_postcode"
                    v-model="configurations.kangu_postcode"
                    mask="cep"
                    :error="errors[0]"
                    :valid="valid"
                    required>
                  </base-input>
                </validation-provider>

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

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

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

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

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

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

                <validation-provider
                  tag="div"
                  name="kangu_ufOrigem"
                  class="top-margin-large"
                  rules="required"
                  v-slot="{ errors, valid }">
                  <base-select
                    class="top-margin-large"
                    :label="entry_uf"
                    name="kangu_ufOrigem"
                    v-model="configurations.kangu_ufOrigem"
                    ref="kangu_ufOrigem"
                    :error="errors[0]"
                    :valid="valid"
                    :disabled="disableForm">
                    <option
                      v-for="(zone, index) in zones"
                      :key="zone.code"
                      :value="zone.code"
                      v-text="zone.name"
                    >
                    </option>
                  </base-select>
                </validation-provider>

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

                <validation-provider
                  tag="div"
                  rules="required|email"
                  class="top-margin-large"
                  name="kangu_contactEmail"
                  v-slot="{ errors, valid }">
                  <base-input
                    :label="entry_contactEmail"
                    name="kangu_contactEmail"
                    v-model="configurations.kangu_contactEmail"
                    :error="errors[0]"
                    :valid="valid"
                    required>
                  </base-input>
                </validation-provider>
              </base-card>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
{% endblock %}
