<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit; ?>
<div class="col-md-<?= $size ?>">
    <h6>
        <?=get_the_title()?>
    </h6>
    <div class="contact_detail_filial">
        <ul>
            <li>
                <div class="icon_wrap"><i class="fas fa-map-marker-alt"></i></div>
                <div class="contact_info_m">
                    <?= $endereco ?>
                </div>
            </li>
            <?php
            foreach ($arrTelefones as $dados):
                $dados = formatarDados($dados);
                ?>
                <li>
                    <a target="_blank" href="<?= $dados['link']; ?>">
                        <div class="icon_wrap">
                            <i class=" <?= $dados['tipo'] == 'telefone' ? 'fas fa-phone' : 'fab fa-whatsapp' ?>"
                               aria-hidden="true"></i>
                        </div>
                        <div class="contact_info_m">
                            <?= $dados['numero']; ?> <?=$dados['descricao']; ?>
                        </div>
                    </a>
                </li>

            <?php endforeach; ?>

            <?php if(!empty($email)):?>
            <li>
                <a href="mailto:<?=$email?>">
                    <div class="icon_wrap">
                        <i class="fas fa-envelope"
                           aria-hidden="true"></i>
                    </div>
                    <div class="contact_info_m">
                        <?=$email?>
                    </div>
                </a>
            </li>
            <?php endif;?>

        </ul>
        <div class="map_wrap">

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