<?php echo $module_newsletter; ?>

<footer class="footer<?php if (empty($module_newsletter)) { ?> top-margin-x-large<?php } ?>">

  <div class="container-fluid top-padding-x-large">
    <div class="row no-space-xs medium-space-sm js-footer-accordion">
      <?php if ($this->config->get('wg24_foot_first_colunm') === 'dynamic') { ?>
        <?php if ($informations) { ?>
          <div class="col-xs-12 col-sm-6 col-md-3">
            <div class="content-box">
              <div class="footer-accordion-control js-accordion-control">
                <div class="flex between-xs middle-xs">
                  <span class="footer-title text-medium text-bold vertical-padding-small vertical-margin-x-small"><?php echo $text_information; ?></span>
                  <i class="fas fa-angle-down hidden-sm-up"></i>
                </div>
              </div>
              <div class="js-accordion-content top-padding-x-small">
                <?php foreach ($informations as $information) { ?>
                  <a href="<?php echo $information['href']; ?>" class="text-medium visible-block vertical-padding-small bottom-margin-small">
                    <?php echo $information['title']; ?>
                  </a>
                <?php } ?>
              </div>
            </div>
          </div>
        <?php } ?>
      <?php } else { ?>
        <div class="col-xs-12 col-sm-6 col-md-3">
          <div class="content-box footer-column-one">
            <?php
              $default_lang=$this->config->get('config_language_id');
              $footer_logo=$this->config->get('wg24_logo_image');
              echo html_entity_decode($footer_logo[$default_lang]);
            ?>
          </div>
        </div>
      <?php } ?>

      <div class="col-xs-12 col-sm-6 col-md-3">
        <div class="content-box">
          <div class="footer-accordion-control js-accordion-control">
            <div class="flex between-xs middle-xs">
              <span class="footer-title text-medium text-bold vertical-padding-small vertical-margin-x-small"><?php echo $text_service; ?></span>
              <i class="fas fa-angle-down hidden-sm-up"></i>
            </div>
          </div>
          <div class="js-accordion-content top-padding-x-small">
            <a href="<?php echo isset($reseller) ? $reseller :'';  ?>" class="text-medium visible-block vertical-padding-small bottom-margin-small">
              <?php echo $text_reseller ?>
            </a>
            <a href="<?php echo $contact; ?>" class="text-medium visible-block vertical-padding-small bottom-margin-small">
              <?php echo $text_contact; ?>
            </a>
            <?php if ($return_status) { ?>
              <a href="<?php echo $return; ?>" class="text-medium visible-block vertical-padding-small bottom-margin-small">
                <?php echo $text_return; ?>
              </a>
            <?php } ?>
            <?php if ($this->config->get('wg24_linkFabricantes')){ ?>
              <a href="<?php echo $manufacturer; ?>" class="text-medium visible-block vertical-padding-small bottom-margin-small">
                <?php echo $text_manufacturer; ?>
              </a>
            <?php } ?>
            <a href="<?php echo $sitemap; ?>" class="text-medium visible-block vertical-padding-small bottom-margin-small">
              <?php echo $text_sitemap; ?>
            </a>
          </div>
        </div>
      </div>
      <div class="col-xs-12 col-sm-6 col-md-3">
        <div class="content-box">
          <div class="footer-accordion-control js-accordion-control">
            <div class="flex between-xs middle-xs">
              <span class="footer-title text-medium text-bold vertical-padding-small vertical-margin-x-small"><?php echo $text_account; ?></span>
              <i class="fas fa-angle-down hidden-sm-up"></i>
            </div>
          </div>
          <div class="js-accordion-content top-padding-x-small">
            <a href="<?php echo $account; ?>" class="text-medium visible-block vertical-padding-small bottom-margin-small">
              <?php echo $text_account; ?>
            </a>
            <a href="<?php echo $order; ?>" class="text-medium visible-block vertical-padding-small bottom-margin-small">
              <?php echo $text_order; ?>
            </a>
            <?php if ($futura_habilita_lista_desejos) { ?>
              <a href="<?php echo $wishlist; ?>" class="text-medium visible-block vertical-padding-small bottom-margin-small">
                <?php echo $text_wishlist; ?>
              </a>
            <?php } ?>
            <a href="<?php echo $newsletter; ?>" class="text-medium visible-block vertical-padding-small bottom-margin-small">
              <?php echo $text_newsletter; ?>
            </a>
          </div>
        </div>
      </div>
      <?php if ($exibe_endereco == 'yes') { ?>
        <div class="col-xs-12 col-sm-6 col-md-3">
          <div class="content-box">

            <?php if ($wg24_type_configuration_contact=='advance') { ?>
              <?php
                $default_lang=$this->config->get('config_language_id');
                $footer_contact=$this->config->get('wg24_contact_info_page_of');

                if(is_array($footer_contact)) {
                  echo html_entity_decode($footer_contact[$default_lang], ENT_COMPAT, 'UTF-8');
                }
              ?>
            <?php } else { ?>
              <div class="footer-accordion-control js-accordion-control">
                <div class="flex between-xs middle-xs">
                  <span class="footer-title text-medium text-bold vertical-padding-small vertical-margin-x-small"><?php echo $text_wg24_titulo_rodape; ?></span>
                  <i class="fas fa-angle-down hidden-sm-up"></i>
                </div>
              </div>
              <div class="js-accordion-content top-padding-x-small">
                <?php if($config_telephone){ ?>
                  <?php foreach($config_telephone as $key => $telefone){ ?>

                      <div class="flex middle-xs vertical-padding-small">
                        <div class="contact-icon">
                          <?php
                              switch ($key) {
                                  case Type_Phone::Tp_Telefone: ?>
                                    <i class="fas fa-phone"></i>
                                <?php     break;
                                  case Type_Phone::Tp_Fax: ?>
                                    <i class="fas fa-fax"></i>
                                <?php     break;
                                  case Type_Phone::Tp_Celular:
                                  case Type_Phone::Tp_Whatsapp: ?>
                                    <i class="fab fa-whatsapp"></i>
                                <?php     break;
                              }
                          ?>
                        </div>
                        <div class="contact-description left-padding-medium">
                          <?php foreach($telefone as $numero){ ?>
                            <span class="text-medium visible-block"><?php echo $numero; ?></span>
                          <?php } ?>
                        </div>
                      </div>

                  <?php } ?>
                <?php } ?>
                <?php if ($text_config_email) { ?>
                  <div class="flex middle-xs vertical-padding-small">
                    <div class="contact-icon">
                      <i class="far fa-envelope"></i>
                    </div>
                    <div class="contact-description left-padding-medium">
                      <span class="text-medium visible-block"><?php echo $text_config_email; ?></span>
                    </div>
                  </div>
                <?php } ?>
                <?php if ($text_config_address) { ?>
                  <div class="flex middle-xs vertical-padding-small">
                    <div class="contact-icon">
                      <i class="fas fa-map-marker-alt"></i>
                    </div>
                    <div class="contact-description left-padding-medium">
                      <span class="text-medium visible-block"><?php echo $text_config_address; ?></span>
                    </div>
                  </div>
                <?php } ?>
              </div>
            <?php } ?>

          </div>
        </div>
      <?php } ?>
    </div>
  </div>

  <div class="container-fluid vertical-padding-x-large">
    <?php
      if (($this->config->get('wg24_facebook_url') != '') || ($this->config->get('wg24_twitter_url') != '') || ($this->config->get('wg24_google_url') != '')
        || ($this->config->get('wg24_rss_url') != '') || ($this->config->get('wg24_pinterest_url') != '') || ($this->config->get('wg24_linking_url') != '')
        || ($this->config->get('wg24_youtub_url') != '') || ($this->config->get('wg24_instagram_url') != '') || (isset($banners) && ($wg24_statuspagamento == 'enable'))
        || ($this->config->get('wg24_twitter_id') != '')
      ) {
    ?>
      <div class="row">
        <div class="col-xs-12 col-sm-6 col-md-width-auto">
          <div class="content-box">
            <div class="footer-social flex">
              <?php if ($this->config->get('wg24_facebook_url')!="") { ?>
                <a href="<?php echo  $this->config->get('wg24_facebook_url') ?>" target="_Blank" title="Facebook" class="fb">
                  <i class="fab fa-facebook-f"></i>
                </a>
              <?php } ?>
              <?php if ($this->config->get('wg24_twitter_url')!="") { ?>
                <a href="<?php echo  $this->config->get('wg24_twitter_url') ?>" target="_Blank" title="Twitter" class="tw">
                  <i class="fab fa-twitter"></i>
                </a>
              <?php } ?>
              <?php if ($this->config->get('wg24_google_url')!="") { ?>
                <a href="<?php echo  $this->config->get('wg24_google_url') ?>" target="_Blank" title="Google Plus" class="googleplus">
                  <i class="fab fa-google-plus-g"></i>
                </a>
              <?php } ?>
              <?php if ($this->config->get('wg24_rss_url')!="") { ?>
                <a href="<?php echo  $this->config->get('wg24_rss_url') ?>" target="_Blank" title="RSS" class="rss">
                  <i class="fas fa-rss"></i>
                </a>
              <?php } ?>
              <?php if ($this->config->get('wg24_pinterest_url')!="") { ?>
                <a href="<?php echo  $this->config->get('wg24_pinterest_url') ?>" target="_Blank" title="Pinterest" class="pintrest">
                  <i class="fab fa-pinterest"></i>
                </a>
              <?php } ?>
              <?php if ($this->config->get('wg24_linking_url')!="") { ?>
                <a href="<?php echo  $this->config->get('wg24_linking_url') ?>" target="_Blank" title="Linked In" class="linkedin">
                  <i class="fab fa-linkedin-in"></i>
                </a>
              <?php } ?>
              <?php if ($this->config->get('wg24_youtub_url')!="") { ?>
                <a href="<?php echo  $this->config->get('wg24_youtub_url') ?>" target="_Blank" title="Youtube" class="youtube">
                  <i class="fab fa-youtube"></i>
                </a>
              <?php } ?>
              <?php if ($this->config->get('wg24_instagram_url')!="") { ?>
                <a href="<?php echo  $this->config->get('wg24_instagram_url') ?>" target="_Blank" title="Instagram" class="instagram">
                  <i class="fab fa-instagram"></i>
                </a>
              <?php } ?>
              <?php if ($this->config->get('wg24_blogger_url')!="") { ?>
                <a href="<?php echo  $this->config->get('wg24_blogger_url') ?>" target="_Blank" title="Blogger" class="blogger">
                  <i class="fab fa-blogger-b"></i>
                </a>
              <?php } ?>
            </div>
          </div>
        </div>
        <?php if(isset($banners) && ($wg24_statuspagamento == 'enable')) { ?>
          <div class="col-xs-12 col-sm-6 col-md">
            <div class="content-box">
              <div class="flex end-md">
                <?php if (!$wg24_bandeiras_automaticas) { ?>
                  <?php foreach ($banners as $banner) { ?>
                    <?php if ($banner['link']) { ?>
                      <div class="padding-x-small">
                        <a href="<?php echo $banner['link']; ?>" onclick="target='_blank'">
                          <picture>
                            <source class="load-image" srcset="<?php echo $banner['image']['webp']; ?>">
                            <img class="load-image" src="../../../../../../../../assets/img/loading-black.svg" data-src="<?php echo $banner['image']['jpg']; ?>" alt="<?php echo $banner['title']; ?>"/>
                          </picture>
                        </a>
                      </div>
                    <?php } else { ?>
                      <div class="padding-x-small">
                        <picture>
                          <source class="load-image" srcset="<?php echo $banner['image']['webp']; ?>">
                          <img class="load-image" src="../../../../../../../../assets/img/loading-black.svg" data-src="<?php echo $banner['image']['jpg']; ?>" alt="<?php echo $banner['title']; ?>"/>
                        </picture>
                      </div>
                    <?php } ?>
                  <?php } ?>
                <?php } else { ?>
                  <?php foreach ($banners as $banner) { ?>
                    <div class="bandeira margin-x-small <?php echo $banner['class'] ?>" title="<?php echo $banner['title']; ?>"></div>
                  <?php } ?>
                <?php } ?>
              </div>
            </div>
          </div>
        <?php } ?>
      </div>
    <?php } ?>
  </div>

  <div class="footer-bottom">
    <div class="container-fluid vertical-padding-x-large">
      <div class="row">
        <div class="col-xs-12">
          <?php if (!$tipo_rodape) { ?>
            <div class="content-box text-center">
              <span class="text-small visible-block bottom-margin-x-small"><strong><?php echo $config_name; ?>:</strong> <?php echo $config_address; ?></span>
              <span class="text-small visible-block bottom-margin-x-small">
                <strong>Telefone(s):</strong>
                <?php echo $config_telephone_rodape; ?>
                <p><strong>E-mail:</strong> <?php echo ($config_email) ? $config_email : $config_email; ?></p>
              </span>
              <span class="text-small visible-block bottom-margin-x-small"><strong>Razão Social:</strong> <?php echo $config_owner; ?></span>
              <?php if ($config_ie != Type_DefaultValues::Tp_Isento) { ?>
                <span class="text-small visible-block bottom-margin-x-small"><strong>Inscrição Estadual:</strong> <?php echo $config_ie; ?></span>
              <?php } ?>
              <span class="text-small visible-block bottom-margin-x-small"><strong>CNPJ:</strong> <?php echo $config_cnpj; ?></span>
              <span class="text-small visible-block">© <?php echo date("Y"); ?> - Todos os direitos reservados.</span>
            </div>
          <?php } else { ?>
            <?php
              $default_lang=$this->config->get('config_language_id');
              $copyright=$this->config->get('wg24_copyr_text');
              if (!empty($copyright[$default_lang])) {
            ?>
              <div class="content-box">
                <?php echo html_entity_decode($copyright[$default_lang]); ?>
              </div>
            <?php }	?>
          <?php } ?>
        </div>
        <?php if ( (isset($banners_certificado) && ($wg24_certificado_status == Type_Certificado::TpCert_Personalizado)) || (isset($banners_certificado) &&  $wg24_certificado_status == Type_Certificado::TpCert_Futura) || (isset($certificate_ebit_status) && $certificate_ebit_status) ) { ?>
        <div class="col-xs-12">
          <div class="content-box flex center-xs middle-xs">
            <?php if ( (isset($banners_certificado) && ($wg24_certificado_status == Type_Certificado::TpCert_Personalizado)) ) { ?>

              <?php foreach ($banners_certificado as $bannercertificado) { ?>
                <?php if ($bannercertificado['link']) { ?><a href="<?php echo $bannercertificado['link']; ?>" target='_blank'><?php } ?>
                  <img src="<?php echo $bannercertificado['image']; ?>" alt="<?php echo $bannercertificado['title']; ?>" class="margin-x-small">
                <?php if ($bannercertificado['link']) { ?></a><?php } ?>
              <?php } ?>

            <?php } else if ( isset($banners_certificado) && ($wg24_certificado_status == Type_Certificado::TpCert_Futura) ) { ?>
              <img src="../../../../image/certificado-ssl.png" alt="Site Seguro - Certificado SSL" class="margin-x-small">
            <?php } ?>

            <?php if (isset($certificate_ebit_status) && $certificate_ebit_status) { ?>
              <a id="seloEbit" class="margin-x-small" href="http://www.ebit.com.br/<?php echo $certificate_ebit_store_id; ?>" target="_blank" data-noop="redir(this.href);"></a>
              <script>
                $LAB.setOptions({AllowDuplicates:true}).script("https://imgs.ebit.com.br/ebitBR/selo-ebit/js/getSelo.js?<?php echo $certificate_ebit_store_id; ?><?php echo isset($certificate_ebit_store_id) && $certificate_ebit_store_id ? '&lightbox=true' : '' ; ?>").wait();
              </script>
            <?php } ?>

          </div>
        </div>
        <?php } ?>

        <?php if($futura_desenvolvidopor){ ?>
          <div class="col-xs-12">
            <div class="content-box text-center">
              <span class="text-small visible-block">Desenvolvido por <a href='http://www.futurasistemas.com.br/lojavirtual' target='_blank'>Futura Sistemas</a></span>
            </div>
          </div>
        <?php } ?>

      </div>
    </div>
  </div>
</footer>

<?php if ($config_cookies_id) { ?>
  <div class="modal-cookies js-modal-cookies hidden">
    <span>Utilizamos cookies e outras tecnologias semelhantes para melhorar sua experiência em nosso site, ao continuar navegando você aceita nossa <a href="<?php echo $page_cookies ?>" target="_blank">Política de cookies</a>.</span>
    <button class="btn-default btn-medium text-medium text-bold js-cookies js-adm-modal-close">Continuar e fechar</button>
  </div>
<?php } ?>

<?php if (isset($fc_back_to_top['status'])) { ?>
  <div class="scroll-to-top <?php echo $fc_back_to_top['position']; ?>">
    <button type="button" class="btn-default btn-medium-square">
      <i class="fas fa-angle-up"></i>
    </button>
  </div>
<?php } ?>

<?php if (isset($fc_whatsapp['status'])) { ?>
  <a href="<?php echo $fc_whatsapp['number']; ?>" class="footer-whatsapp <?php echo $fc_whatsapp['position']; ?>" target="_blank">
    <i class="fab fa-whatsapp"></i>
  </a>
<?php } ?>

<?php if ($ambiente_teste) { ?>
  <div class="ambiente-teste">Ambiente de Teste Ativado</div>
<?php } ?>

<script async defer src="<?php echo $scripts_async; ?>"></script>
<?php echo $scripts_bottom ?>

<?php if($wg24_google_recaptcha_status){ ?>

<script>
    var onloadCallback = function() {
        var element = document.querySelector('.g-recaptcha');
        if (element) {
            var site_key = element.getAttribute('data-sitekey');
            grecaptcha.render(element, {
                'sitekey' : site_key
            });
        }
    };
</script>
<script
        src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit"
        async
        defer
></script>

<?php } ?>

  <script type="text/javascript">
    window.waitEvent('scripts_document', function(){
      $(".load-image").imageLoad();
      window.gridFix();
      window.addEventListener('resize', gridFix);
    });
  </script>

</body>
</html>