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

{% block content %}

<div class="container-fluid">
  <div class="row">
    <div class="col-xs-12">
      <div class="row">
        <div class="col-sm-8">
          <base-card class="padding-large">
              <validation-provider
                tag="div"
                class="top-margin-small"
                rules="required"
                name="flat_cost"
                v-slot="{ errors, valid }">
                  <base-input
                    type="text"
                    :label="entry_cost"
                    name="entry_cost"
                    v-model="configurations.flat_cost"
                    :error="errors[0]"
                    mask="brazilCurrency"    
                    :valid="valid"
                    required>
                  </base-input>
              </validation-provider>


              <validation-provider
                tag="div"
                class="top-margin-medium"
                name="flat_total_minimo"
                v-slot="{ errors, valid }">
                  <base-input
                    :label="entry_total_minimo"
                    :description="entry_total_minimo_obs"
                    name="entry_total_minimo"
                    v-model="configurations.flat_total_minimo"
                    :error="errors[0]"
                    mask="brazilCurrency"
                    :valid="valid">
                  </base-input>
              </validation-provider>
          </base-card>
        </div>


        <div class="col-xs-12 col-sm-4">
          <base-card class="padding-large">  
            <validation-provider
              tag="div"
              name="flat_status"
              v-slot="{ errors, valid }">
              <base-select
                :label="entry_status"
                name="flat_status"
                v-model="configurations.flat_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"
              name="flat_geo_zone_id"
              v-slot="{ errors, valid }">
                <base-select
                  :label="entry_geo_zone"
                  name="flat_geo_zone_id"
                  v-model="configurations.flat_geo_zone_id"
                  :error="errors[0]"
                  :valid="valid">
                      <option value="0">{ text_all_zones }</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>   


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

{% endblock %}