{{ header }}
  <div class="ftr-container">
    <form class="ftr-form" action="{{ action }}" method="post" enctype="multipart/form-data">
      <label class="ftr-field {{ (error_firstname) ? 'error' : '' }}">
        <input type="text" id="firstname" name="firstname" class="ftr-field__entry ftr-js-field__entry" value="{{ firstname }}" maxlength="32" required>
        <span class="ftr-field__text">{{ entry_firstname }}</span>
        {% if error_firstname %}
          <span class="ftr-field__error">{{ error_firstname }}</span>
        {% endif %}
      </label>
      <label class="ftr-field {{ (error_lastname) ? 'error' : '' }}">
        <input type="text" id="lastname" name="lastname" class="ftr-field__entry ftr-js-field__entry" value="{{ lastname }}" maxlength="32" required>
        <span class="ftr-field__text">{{ entry_lastname }}</span>
        {% if error_lastname %}
          <span class="ftr-field__error">{{ error_lastname }}</span>
        {% endif %}
      </label>
      <label class="ftr-field {{ (error_email) ? 'error' : '' }}">
        <input type="email" id="email" name="email" class="ftr-field__entry ftr-js-field__entry" value="{{ email }}" maxlength="96" required>
        <span class="ftr-field__text">{{ entry_email }}</span>
        {% if error_email %}
          <span class="ftr-field__error">{{ error_email }}</span>
        {% endif %}
      </label>
      <label class="ftr-field {{ (error_telephone) ? 'error' : '' }}">
        <input type="tel" id="telephone" name="telephone" class="ftr-field__entry ftr-js-field__entry mask-phone" value="{{ telephone }}" maxlength="32" {{ (fields_register_brazil_status_telefone) ? 'required' : '' }}>
        <span class="ftr-field__text">{{ entry_telephone }}</span>
        {% if error_telephone %}
          <span class="ftr-field__error">{{ error_telephone }}</span>
        {% endif %}
      </label>
      {% if fields_register_brazil_status_telefone2 %}
        <label class="ftr-field {{ (error_fax) ? 'error' : '' }}">
          <input type="tel" id="fax" name="fax" class="ftr-field__entry ftr-js-field__entry mask-phone" value="{{ fax }}" maxlength="32">
          <span class="ftr-field__text">{{ entry_fax }}</span>
          {% if error_fax %}
            <span class="ftr-field__error">{{ error_fax }}</span>
          {% endif %}
        </label>
      {% endif %}
      <label class="ftr-field {{ (error_celular) ? 'error' : '' }}">
        <input type="tel" id="celular" name="celular" class="ftr-field__entry ftr-js-field__entry mask-celular" value="{{ celular }}" maxlength="32" {{ (fields_register_brazil_status_celular) ? 'required' : '' }}>
        <span class="ftr-field__text">{{ entry_cellphone }}</span>
        {% if error_celular %}
          <span class="ftr-field__error">{{ error_celular }}</span>
        {% endif %}
      </label>

      {% if feedback_whatsapp %}
        <label class="ftr-field">
          <input type="tel" id="feedback_whatsapp_number" name="feedback_whatsapp_number" class="ftr-field__entry ftr-js-field__entry mask-celular" value="{{ feedback_whatsapp_number }}" maxlength="32">
          <span class="ftr-field__text">{{ entry_whatsapp }}</span>
        </label>
      {% endif %}

      {% if fields_register_brazil_status_sexo and pessoa == tp_fisico %}
        <span class="ftr-text--s">{{ entry_sex }}</span>
        <input class="ftr-radio" id="male" type="radio" name="sexo" value="m" {{ (sexo == 'm') ? 'checked' : '' }}>
        <label class="ftr-radio-label" for="male">
          <span class="ftr-radio-label__text">{{ entry_male }}</span>
        </label>
        <input class="ftr-radio" id="female" type="radio" name="sexo" value="f" {{ (sexo == 'f') ? 'checked' : '' }}>
        <label class="ftr-radio-label" for="female">
          <span class="ftr-radio-label__text">{{ entry_female }}</span>
        </label>
        <input class="ftr-radio" id="other" type="radio" name="sexo" value="o" {{ (sexo == 'o') ? 'checked' : '' }}>
        <label class="ftr-radio-label" for="other">
          <span class="ftr-radio-label__text">{{ entry_other }}</span>
        </label>
      {% endif %}
      {% if fields_register_brazil_status_data_nascimento and pessoa == tp_fisico %}
        <label class="ftr-field {{ (error_data_nascimento) ? 'error' : '' }}" id="data_nascimento">
          <input type="text" class="ftr-field__entry ftr-js-field__entry mask-date" value="{{ data_nascimento }}" readonly {{ (fields_register_brazil_status_data_nascimento_required) ? 'required' : '' }}>
          <span class="ftr-field__text">{{ entry_birthday }}</span>
          <input type="hidden" name="data_nascimento" value="{{ data_nascimento }}">
          {% if error_data_nascimento %}
            <span class="ftr-field__error">{{ error_data_nascimento }}</span>
          {% endif %}
        </label>
      {% endif %}
      {% if pessoa == tp_fisico %}
        <input type="hidden" name="pessoa" id="fisica" value="{{ tp_fisico }}" checked>
        <label class="ftr-field {{ (error_cpf) ? 'error' : '' }}">
          <input type="text" id="cpf" name="cpf" class="ftr-field__entry ftr-js-field__entry mask-cpf" value="{{ cpf }}" maxlength="14" readonly>
          <span class="ftr-field__text">{{ entry_cpf }}</span>
          {% if error_cpf %}
            <span class="ftr-field__error">{{ error_cpf }}</span>
          {% endif %}
        </label>
        {% if fields_register_brazil_status_rg %}
          <label class="ftr-field {{ (error_rg) ? 'error' : '' }}">
            <input type="text" id="rg" name="rg" class="ftr-field__entry ftr-js-field__entry" value="{{ rg }}" maxlength="20">
            <span class="ftr-field__text">{{ entry_rg }}</span>
            {% if error_rg %}
              <span class="ftr-field__error">{{ error_rg }}</span>
            {% endif %}
          </label>
        {% endif %}
      {% else %}
        <label class="ftr-field {{ (error_razao_social) ? 'error' : '' }}">
          <input type="text" id="razao_social" name="razao_social" class="ftr-field__entry ftr-js-field__entry" value="{{ razao_social }}" maxlength="200">
          <span class="ftr-field__text">{{ entry_company_name }}</span>
          {% if error_razao_social %}
            <span class="ftr-field__error">{{ error_razao_social }}</span>
          {% endif %}
        </label>
        <input type="hidden" name="pessoa" id="juridica" value="{{ tp_juridico }}" checked>
        <label class="ftr-field {{ (error_cnpj) ? 'error' : '' }}">
          <input type="text" id="cnpj" name="cnpj" class="ftr-field__entry ftr-js-field__entry mask-cnpj" value="{{ cnpj }}" maxlength="18" readonly>
          <span class="ftr-field__text">{{ entry_cnpj }}</span>
          {% if error_cnpj %}
            <span class="ftr-field__error">{{ error_cnpj }}</span>
          {% endif %}
        </label>
        <label class="ftr-field {{ (error_ie) ? 'error' : '' }}">
          <input type="text" id="inscricao_estadual" name="inscricao_estadual" class="ftr-field__entry ftr-js-field__entry" value="{{ inscricao_estadual }}" maxlength="200" {{ (fields_register_brazil_status_ie_pj) ? '' : 'readonly' }}>
          <span class="ftr-field__text">{{ entry_state_registration }}</span>
          {% if error_ie %}
            <span class="ftr-field__error">{{ error_ie }}</span>
          {% endif %}
        </label>

        <label for="perfil" class="ftr-select ftr-js-select ftr-js-pessoa-juridica {{ (fields_register_brazil_status_perfil_pj) ? '' : 'ftr-select--disabled ftr-js-select--disabled written' }}">
          <input class="ftr-select__entry ftr-js-select__entry" type="text" name="" value="" id="perfil" disabled readonly>
          <span class="ftr-select__text">{{ entry_profile }}</span>
          <input class="ftr-js-select__value" type="hidden" name="perfil" value="{{ perfil }}">
          <div class="ftr-select__content">
            {% for key, value in Type_PerfilCustomerJuridico %}
              <span class="ftr-select__content__item ftr-js-select__content__item ftr-js-ripple-effect" data-value="{{ key }}" {{ (key == perfil) ? 'data-selected="true"' : '' }}>{{ value }}</span>
            {% endfor %}
          </div>
        </label>

        <label class="ftr-select ftr-js-select ftr-js-pessoa-juridica {{ (fields_register_brazil_status_contribuinte_pj) ? '' : 'ftr-select--disabled ftr-js-select--disabled written' }}" for="contribuinte">
          <input class="ftr-select__entry ftr-js-select__entry" type="text" name="" value="" id="contribuinte" disabled readonly>
          <span class="ftr-select__text">{{ text_contribute_icms }}</span>
          <input class="ftr-js-select__value" type="hidden" name="contribuinte" value="{{ contribuinte }}">
          <div class="ftr-select__content">
            {% for key, value in Type_PjContribuoIcms %}
              <span class="ftr-select__content__item ftr-js-select__content__item ftr-js-ripple-effect" data-value="{{ key }}" {{ (key == contribuinte) ? 'data-selected="true"' : '' }}>{{ value }}</span>
            {% endfor %}
          </div>
        </label>
      {% endif %}
      <button type="submit" class="ftr-btn ftr-h--full ftr-background--primary ftr-js-ripple-effect">
        {{ t_save }}
      </button>
    </form>
  </div>
{{ footer }}
