<?php  
use Source\Helpers\Check;
?><div class="breadcrumb-area">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="breadcrumb-content">                   
                    <?php
                    $databread = [];
                    $databread[] = ['title' => '<i  class="fa fa-home"></i> Home', "href" => SITE];
                    $databread[] = ['title' => 'Nossas lojas', "href" => SITE . $site['page_name']];
                    echo setBreadCrumd($databread)
                    ?>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Breadcrumb Area End-->
<!-- contact area start -->
<div class="contact-area mtb-60px">

    <div class="container">
        <div class="section-title text-center">
            <h1>NOSSAS LOJAS</h1>
            <div class="d-inline">
                <img src="<?= INCLUDE_PATH ?>images/Retangulo.png" alt="NOSSAS LOJAS" width="120"/>
            </div>
        </div>

        <?php
        $lojas = [
            [
                "title" => "Encasa Materiais de Construção - Matriz Itapuranga",
                "endereco" => "Rua 47-A, 500,St. Central.</span> <span itemprop='addressLocality'> Itapuranga - GO, </span><span itemprop='postalCode'>76680-000</span>",
                "telefone" => "(62) 3355-1661",
                "image" => "images/fachada-lojas/01.png",
                "map" => "https://goo.gl/maps/iu4jme1dkvFgQty28",
            ],
            [
                "title" => "Filial Encasa Materiais de Construção - Centro de distribuição Itapuranga",
                "endereco" => "<span itemprop='streetAddress'>Rodovia GO-156, KM 3, Zona rural.</span> <span itemprop='addressLocality'> Itapuranga - GO, </span><span itemprop='postalCode'>76680-000</span>",
                "telefone" => false,
                "image" => "images/fachada-lojas/02.png",
                "map" => "https://g.page/EncasaMatConstrucaoLoja02?share",
            ],
            [
                "title" => "Filial Encasa Materiais de Construção - Itapuranga",
                "endereco" => "<span itemprop='streetAddress'>Av. Monteiro Lobato, Zona Rural.</span> <span itemprop='addressLocality'> Itapuranga - GO, </span><span itemprop='postalCode'>76680-000</span>",
                "telefone" => "(62) 3312-2402",
                "image" => "images/fachada-lojas/03.png",
                "map" => "https://g.page/EncasaMatConstrucaoLoja02?share",
            ],
            [
                "title" => "Filial Encasa Materiais de Construção - Faina",
                "endereco" => "<span itemprop='streetAddress'>Rodovia GO-164, Esq. c/Rua 02 - Vila Vieira,</span> <span itemprop='addressLocality'>Faina - GO,</span> <span itemprop='postalCode'>76740-000</span>",
                "telefone" => "(62) 3386-1449",
                "image" => "images/fachada-lojas/04.png",
                "map" => "https://goo.gl/maps/FBQubXYhxVn2ubYv7",
            ],
            [
                "title" => "Filial Encasa Materiais de Construção - Porangatu",
                "endereco" => "<span itemprop='streetAddress'>Av. Federal, 317, St. Central,</span> <span itemprop='addressLocality'> Porangatu - GO, </span><span itemprop='postalCode'>76550-000</span>",
                "telefone" => "(62) 3367-1516",
                "image" => "images/fachada-lojas/05.png",
                "map" => "https://g.page/r/CZ23hOr7hsAGEAE",
            ],
            [
                "title" => "Filial Encasa Materiais de Construção - Uruaçu",
                "endereco" => "<span itemprop='streetAddress'>Avenida Transbrasiliana,156, Quadra 23, Lote 85, Centro,</span> <span itemprop='addressLocality'>Uruaçu - GO,</span> <span itemprop='postalCode'>76400-000</span>",
                "telefone" => "(62) 3357-1231",
                "image" => "images/fachada-lojas/06.png",
                "map" => "https://goo.gl/maps/f45hBkPmRuqKcHd36",
            ],
                ]
        ?>
        <div class="row mt-60px">

            <?php
            foreach ($lojas as $loja):
                extract($loja);
                ?>

                <div class="col-md-6 mb-lm-30px" itemscope itemtype="https://schema.org/Organization">
                    <div class="single-blog-post mb-30px blog-grid-post single-lojas">
                        <div class="blog-post-media">
                            <div class="blog-image">
                                <a href="<?= $map ?>"><img src="<?= Check::CheckPhoto($image, REQUIRE_PATH, true, 500, 300) ?>" alt="<?= $title ?>" class="img-responsive" /></a>
                            </div>
                        </div>
                        <div class="blog-post-content-inner mt-30px">
                            <h4 class="blog-title" itemprop="name"> <?= $title ?> </h4>
                            <ul class="single-list">
                                <?php if ($telefone): ?>
                                    <li>
                                        <b>TELEFONE:</b><br><a itemprop="telephone" href="tel://<?= $telefone ?>"><?= $telefone ?></a>
                                    </li>
                                <?php endif; ?>
                                <li itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
                                    <b>ENDEREÇO:</b><br><?= $endereco ?>
                                </li>
                                <li>
                                    <b>ATENDIMENTO:</b><br>
                                    SEG. A SEX. | 07:00 - 18:00<br>
                                    SÁBADO. | 07:00 - 12:00<br>

                                </li>
                                <li>
                                    <a href="<?= $map ?>" class="single-mapa" target="_blank"><i class="fa fa-map-marker"></i> ABRIR NO MAPA</a>
                                </li>
                            </ul> 
                        </div>
                    </div>

                </div>
            <?php endforeach; ?>


 <!--        </div>
       <script
            src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBIwzALxUPNbatRBj3Xi1Uhp0fFzwWNBkE&callback=initMap&libraries=&v=weekly"
            defer
        ></script>-->
        <script>

            // The following example creates a marker in Stockholm, Sweden using a DROP
            // animation. Clicking on the marker will toggle the animation between a BOUNCE
            // animation and no animation.
           /* let matriz,centro; 

            function initMap() {
                const map = new google.maps.Map(document.getElementById("map"), {
                    zoom: 13,
                    center: {lat: 14.525494, lng: -49.147071},
                });
                matriz = new google.maps.Marker({
                    map,
                    animation: google.maps.Animation.DROP,
                    position: {lat: -13.4351534, lng: -49.1455505},
                    title: "Encasa Materiais de Construção - Porangatu ",
                });
                centro = new google.maps.Marker({
                    map,
                    animation: google.maps.Animation.DROP,
                    position: {lat: -14.5254936, lng: -49.1492593},
                    title: "Encasa Materiais de Construção - Uruaçu ",
                });


                matriz.addListener("click", toggleBounce);
                centro.addListener("click", toggleBounce);

            }

            function toggleBounce() {
                if (marker.getAnimation() !== null) {
                    marker.setAnimation(null);
                } else {
                    marker.setAnimation(google.maps.Animation.BOUNCE);
                }
            }
     * *
            */ 
        </script>
        <div class="contact-map mb-10">
            <!--<div id="map">content</div>-->
            <iframe id="map" src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d677590.6084927836!2d-49.89006553036388!3d-15.053052694113681!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x93430eb16fac988f%3A0x2c7e72ceb20dd820!2sEncasa%20Materiais%20de%20Constru%C3%A7%C3%A3o!5e0!3m2!1spt-PT!2sbr!4v1601605946696!5m2!1spt-PT!2sbr" width="100%" height="450" frameborder="0" style="border:0; width:100%;" allowfullscreen="" aria-hidden="false" tabindex="0"></iframe>;
        </div>
        <div class="custom-row-2 d-none">
            <div class="col-lg-4 col-md-5 mb-lm-30px">
                <div class="contact-info-wrap">
                    <div class="single-contact-info">
                        <div class="contact-icon">
                            <i class="ion-android-call"></i>
                        </div>
                        <div class="contact-info-dec">
                            <p><a href="tel://<?= str_replace(["(", ")", "-", " "], "", SITE_END_TEL) ?>"><?= SITE_END_TEL ?></a></p>
                            <p><a href="tel://<?= str_replace(["(", ")", "-", " "], "", SITE_END_TEL_1) ?>"><?= SITE_END_TEL_1 ?></a></p>
                        </div>
                    </div>
                    <div class="single-contact-info">
                        <div class="contact-icon">
                            <i class="ion-android-globe"></i>
                        </div>
                        <div class="contact-info-dec">
                            <p><a href="mailto://<?= EMAILSUPORT ?>"><?= EMAILSUPORT ?></a></p> 
                        </div>
                    </div>
                    <div class="single-contact-info">
                        <div class="contact-icon">
                            <i class="ion-android-pin"></i>
                        </div>
                        <div class="contact-info-dec">
                            <p>Endereço <?= SITE_END_RUA ?><?= SITE_END_NUM ?>,</p>
                            <p><?= SITE_END_BAIRRO ?>,<?= SITE_END_CIDADE ?>-<?= SITE_END_UF ?>.</p>
                        </div>
                    </div>
                    <div class="contact-social">
                        <h3>Siga-nos</h3>
                        <div class="social-info">
                            <ul>
                                <?php if (APP_FACE_AUTHOR): ?>
                                    <li>
                                        <a href="https://facebook.com/<?= APP_FACE_AUTHOR ?>" title="Página no facebook"><i class="ion-social-facebook"></i></a>
                                    </li>
                                    <?php
                                endif;
                                if (APP_TWITTER_CREATOR):
                                    ?>
                                    <li>
                                        <a href="https://twitter.com/<?= APP_TWITTER_CREATOR ?>" title="Página no Twitter"><i class="ion-social-twitter"></i></a>
                                    </li> 
                                    <?php
                                endif;
                                if (INSTAGRAM_USER):
                                    ?>
                                    <li>
                                        <a href="https://instagram.com/<?= INSTAGRAM_USER ?>" title="Página no facebook"><i class="ion-social-instagram"></i></a>
                                    </li>
                                <?php endif; ?>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-8 col-md-7">
                <div class="contact-form">
                    <div class="contact-title mb-30">
                        <h2>Fala conosco</h2>
                    </div>
                    <form class="contact-form-style" id="contact-form" action="assets/php/mail.php" method="post">
                        <div class="row">
                            <div class="col-lg-6">
                                <input name="name" placeholder="Nome*" type="text" />
                            </div>
                            <div class="col-lg-6">
                                <input name="email" placeholder="Email*" type="email" />
                            </div>
                            <div class="col-lg-12">
                                <input name="subject" placeholder="Assunto*" type="text" />
                            </div>
                            <div class="col-lg-12">
                                <textarea name="message" placeholder="Sua mensagem*"></textarea>
                                <button class="submit" type="submit">ENVIAR</button>
                            </div>
                        </div>
                    </form>
                    <p class="form-messege"></p>
                </div>
            </div>

        </div>
    </div>
</div>
<!-- contact area end -->