<!--inicio step-3 -->
<div class="preview-page step mb-30" data-title="">
    <div class="row d-flex justify-content-left m-0">
        <div class="col-lg-6 div-form-left">
            <div class="form-group">
                <h2 class="subtitle-page">Pre-visualização do anúncio do imóvel</h2>
                <hr>
            </div>
        </div>
    </div>
    <div class="row m-0">
        <div class="col-lg-12">
            <div class="row d-flex justify-content-center m-0">
                <div class="col-lg-12 no-padding">
                    <!--<div class="container-header-detalhes bg-white">-->
                    <div class="bg-white">
                        <div class="row d-flex justify-content-center m-0">
                            <div class="col-md-12 col-lg-12 div-form-left">
                                <div class="container-galeria">
                                    <!--Fotos-->
                                    <div class="container-fotos">
                                        <?php if($logado == true){ ?>
                                        <div class="box-favoritos actFavoritos <?php e(isset($favoritos[$imovel->id_imovel]) ? 'btn_descurtir color_red' : 'btn_curtir color_grey'); ?>" title="<?php e(isset($favoritos[$imovel->id_imovel]) ? 'Remover dos favoritos' : 'Adicionar como favorito'); ?>" data-id="<?php e($imovel->id_imovel); ?>">
                                            <i class="fa fa-heart" aria-hidden="true"></i>
                                        </div>
                                        <?php }else{ ?>
                                        <div class="box-favoritos-empty"></div>
                                        <?php } if(!empty($imagens)){ ?>
                                        <div class="galeria">
                                            <div id="gallery" style="display:none;">
                                                <?php 
                                                    foreach($imagens as $img_galeria){
                                                        $alt = (is_null($img_galeria->alt)) ? '' : $img_galeria->alt; // Titulo
                                                        $img = $img_base.'/'.$img_galeria->imagem;
                                                        $desc = (is_null($img_galeria->descricao)) ? '' : $img_galeria->descricao;
                                                    ?>
                                                <img alt="<?php HImg::alt($img_galeria); ?>" src="<?php HImg::ref($img_galeria); ?>" data-image="<?php HImg::ref($img_galeria); ?>" data-description="<?php HImg::desc($img_galeria); ?>">
                                                <?php } ?>
                                            </div>
                                        </div>
                                        <?php } else { ?>
                                        <div class="galeria">
                                            <div id="gallery" style="display:none;">
                                                <img src="<?php e(base_url('themes/comdono/img/no-image-gallery.png'))?>" class="img-fluid" alt="Não há imagens">
                                            </div>
                                        </div>
                                        <?php } ?>
                                    </div>
                                    
                                    <!--Videos-->
                                    <div class="container-videos w-100 d-none">
                                        <div class="galeria no-image">
                                            <img src="<?php e(base_url('themes/comdono/img/no-image.png'))?>" class="img-fluid" alt="Não há imagens">
                                        </div>
                                    </div>
                                    
                                    <!--Street View-->
                                    <input type="hidden" name="latitude" id="latitude" value="<?php e($imovel->latitude)?>">
                                    <input type="hidden" name="longitude" id="longitude" value="<?php e($imovel->longitude)?>">
                                    <div class="container-street-view w-100 d-none" id="mapStreetView"></div>
                                    
                                    <!--Map-->
                                    <div class="container-map w-100 d-none" id="mapImovel"></div>
                                    
                                    <!--Actions-->
                                    <div class="container-actions">
                                        <div class="row m-0">
                                            <div class="col border-separator-right">
                                                <div class="item-action actFotos">
                                                    <span class="ico">
                                                        <img src="<?php e(base_url('assets/img/comdono/icons/act-fotos.png'))?>" alt="Ver fotos">
                                                    </span>
                                                    <span class="text">Fotos</span>
                                                </div>
                                            </div>
                                            <div class="col border-separator-right bsr-none-767">
                                                <div class="item-action actVideo">
                                                    <span class="ico">
                                                        <img src="<?php e(base_url('assets/img/comdono/icons/act-video-3d.png'))?>" alt="Confira em vídeo">
                                                    </span>
                                                    <span class="text">Tour 3D</span>
                                                </div>
                                            </div>
                                            <div class="col border-separator-right">
                                                <div class="item-action actMap">
                                                    <span class="ico">
                                                        <img src="<?php e(base_url('assets/img/comdono/icons/act-map.png'))?>" alt="Confira no Street View">
                                                    </span>
                                                    <span class="text">Ver no mapa</span>
                                                </div>
                                            </div>
                                            <div class="col border-separator-right bsr-none-767">
                                                <div class="item-action actStreetView">
                                                    <span class="ico">
                                                        <img src="<?php e(base_url('assets/img/comdono/icons/act-street-view.png'))?>" alt="Confira no Street View">
                                                    </span>
                                                    <span class="text">Street View</span>
                                                </div>
                                            </div>
                                            <div class="col">
                                                <div class="item-action actCompartilhar">
                                                    <a data-toggle="collapse" href="#boxCompartilhar" role="button" aria-expanded="false" aria-controls="boxCompartilhar">
                                                        <span class="ico">
                                                            <img src="<?php e(base_url('assets/img/comdono/icons/act-compartilhar.png'))?>" alt="Compartilhar">
                                                        </span>
                                                        <span class="text">Compartilhar</span>
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                        <div id="boxCompartilhar" class="collapse">
                                            <div class="box-caret"><i class="fa fa-caret-up"></i></div>
                                            <div class="container-compartilhar">
                                                <div class="row">
                                                    <div class="col-lg-12">
                                                        <ul class="list-inline">
                                                           <li class="list-inline-item" style="position: relative;top: 0px;">
                                                               <div class="fb-share-button" data-href="<?php //echo base_blog()?>postagem/<?php //echo $dados['key']; ?>" data-layout="button" data-size="small" data-mobile-iframe="true">
                                                                   <a target="_blank" href="<?php //echo base_blog()?>postagem/<?php //echo $dados['key']; ?>" class="fb-xfbml-parse-ignore">Facebook</a>
                                                               </div>
                                                           </li>
                                                           <li class="list-inline-item" style="position: relative;top: 7px;">
                                                               <a class="twitter-share-button" href="https://twitter.com/intent/tweet?text=<?php //echo $dados['titulo']; ?>&url=<?php //echo base_blog(); ?>postagem/<?php //echo $dados['key']; ?>">Tweeter</a>
                                                           </li>
                                                           <li class="list-inline-item" style="position: relative;top: 7px;">
                                                               <div class="g-plus" data-action="share" data-annotation="none"></div>
                                                           </li>
                                                           <li class="list-inline-item" style="position: relative;top: 1px;">
                                                               <a data-pin-do="buttonBookmark" data-pin-save="true" href="https://www.pinterest.com/pin/create/button/"></a>
                                                           </li>
                                                           <li class="list-inline-item">
                                                               <a href="https://api.whatsapp.com/send?phone=5561994483087&amp;text=Olá, gostaria de saber mais informações sobre www.comdono.com" target="_blank">
                                                                    <div class="btn-comp btn-whatsapp">
                                                                        <i class="fa fa-whatsapp" aria-hidden="true"></i> Whatsapp
                                                                    </div>
                                                                </a>
                                                           </li>
                                                           <li class="list-inline-item">
                                                               <div class="btn-comp btn-email btn-email-post" data-subject="<?php //echo $dados['titulo']; ?>" data-url="<?php //echo base_blog(); ?>postagem/<?php //echo $dados['key']; ?>">
                                                                    <i class="fa fa-envelope" aria-hidden="true"></i> Compartilhar
                                                                </div>
                                                           </li>
                                                        </ul>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="info-imovel">
                                        <div class="row">
                                            <div class="col-md-5 col-lg-5">
                                                <h3>
                                                    <?php e($imovel->endereco); ?> - <?php e($imovel->bairro); ?><br>
                                                    <span><?php e($imovel->cidade); ?>-<?php e($imovel->estado); ?> - <?php e($imovel->cep); ?></span>
                                                </h3>
                                            </div>
                                            <div class="col-md-4 col-lg-2 p-0">
                                                <h3>
                                                    R$ <?php e(number_format($imovel->val_pretendido, 2, ',', '.')); ?><br>
                                                    <span><?php e($imovel->tipo_imovel." - ".$imovel->area_privativa." m²"); ?></span>
                                                </h3>
                                            </div>
                                            <div class="col-md-3 col-lg-2">
                                                <div class="box-simulador">
                                                    <div class="ico">
                                                        <img src="<?php e(base_url('assets/img/comdono/icons/minhas-vendas-white.png'))?>" alt="Simule o Pagamento" width="auto" height="30">
                                                    </div>
                                                    <div class="text">Simulador<br>de pagamento</div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row d-flex justify-content-center border-content-preview m-0">
                <div class="col-md-12 div-form-right d-block-991">
                    <div class="container-informativo page-detalhe-imovel">
                        <div class="box-informativo">
                            <div class="sidebar-left-item">
                                <div class="img">
                                    <?php if ($imovel->dn_img != "") { ?>
                                        <img src="<?php e(base_url('modules/anunciante/'.$imovel->id_cadastro.'/perfil/'.$imovel->dn_img)); ?>" class="rounded-circle dono-imovel" alt="<?php e($imovel->dn_nome_nomefantasia); ?>" >
                                    <?php } else {?>
                                        <img src="<?php e(base_url('assets/img/comdono/icons/meus-dados.png')); ?>" class="rounded-circle dono-imovel" alt="<?php e($imovel->dn_nome_nomefantasia); ?>" >
                                    <?php } ?>
                                </div>
                                <div class="text text-blue mt-10">
                                    <span class="nome-dono">
                                    Dono: <?php e(current(str_word_count($imovel->dn_nome_nomefantasia,1))); ?>
                                    </span>
                                    <div class="box-cta-imovel">
                                        <img src="<?php e(base_url('assets/img/comdono/icons/act-chat-w.png')); ?>" class="img-fluid" alt="Converse com o dono">
                                        Converse com o dono
                                    </div>
                                </div>
                            </div>
                            
                            <?php if (($imovel->val_condominio !== "0.00") || ($imovel->val_iptu !== "0.00") || ($imovel->imovel_canto !== "")) { ?>
                            <div class="sidebar-left-item border-separator-top">
                                <div class="text w-100">
                                    <h3>Outras informações</h3>
                                    <ul class="outras-infors">
                                        <?php if ($imovel->val_condominio !== "0.00") { ?>
                                        <li>Condomínio: <span>R$ <?php e(number_format($imovel->val_condominio, 2, ',', '.')); ?>/mês</span></li>
                                        <?php } ?>
                                        <?php if (($imovel->val_iptu !== "0.00")) { ?>
                                        <li>IPTU: <span>R$ <?php e(number_format($imovel->val_iptu, 2, ',', '.')); ?>/ano</span></li>
                                        <?php } ?>
                                        <?php if (($imovel->imovel_canto !== "")) { ?>
                                        <li>Imóvel de canto: <span><?php e($imovel->imovel_canto == "Sim" ? "Sim" : "Não"); ?></span></li>  
                                        <?php } ?>                          
                                    </ul>
                                </div>
                            </div>
                            <?php } if($imovel->caracteristicas !== ""){ ?>
                            <div class="sidebar-left-item border-separator-top">
                                <div class="text text-justify w-100">
                                    <h3>Mais características</h3>
                                    <?php
                                      $quebra = explode(" ", $imovel->caracteristicas);
                                      $count = count($quebra);
                                        if ( $count > 30)
                                        {
                                        	for($i = 0; $i < 30; $i++)
                                        	{
                                        		echo $quebra[$i]." ";
                                        	}
                                     ?>
                                     <div class="collapse" id="textLeiaMais">
                                     <?php 
                                         for($x = 30; $x < $count; $x++)
                                         { 
                                             e($quebra[$x]." "); 
                                         } 
                                     ?>
                                     </div>
                                     <div class="text-right">
                                         <a data-toggle="collapse" class="collapsed" href="#textLeiaMais" aria-expanded="false">Leia mais <i class="fa" aria-hidden="true"></i></a>
                                     </div>
                                      <?php
                                        }
                                        else
                                        {
                                        	e($imovel->caracteristicas);
                                        }
                                     ?>
                                </div>
                            </div>
                            <?php } ?>
                        </div>
                    </div>
                </div>
                <div class="col-md-12 col-lg-9 div-form-left">
                    <div class="detalhes-imovel">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="container-detalhes">
                                    <div class="row">
                                        <?php if(!empty($arrayImovel)){ ?>
                                        <div class="col-lg-12">
                                            <h3>Detalhes do imóvel</h3>
                                            <div class="container-detalhes-info">
                                                <div class="row">
                                                    <?php foreach ($arrayImovel as $array) { ?>
                                                    <div class="col-2">
                                                        <div class="content-item">
                                                            <div class="ico">
                                                                <img src="<?php e(base_url('assets/img/comdono/icons/'.$array['ico']))?>" class="img-fluid" alt="Ver fotos">
                                                            </div>
                                                            <div class="text">
                                                                <?php e($array['ico_name']);?><br>
                                                                <?php e($array['val']); ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <?php } ?>
                                                </div>
                                            </div>
                                        </div>
                                        
                                        <?php } if (!empty($arrayCondominio)){ ?>
                                        <div class="col-lg-12">
                                            <hr>
                                            <h3>Detalhes do condomínio</h3>
                                            <div class="container-detalhes-info">
                                                <div class="row">
                                                    <?php foreach ($arrayCondominio as $array) { ?>
                                                    <div class="col-2">
                                                        <div class="content-item">
                                                            <div class="ico">
                                                                <img src="<?php e(base_url('assets/img/comdono/icons/'.$array['ico']))?>" class="img-fluid" alt="Ver fotos">
                                                            </div>
                                                            <div class="text">
                                                                <?php e($array['ico_name']);?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <?php } ?>
                                                </div>
                                            </div>
                                        </div>
                                        <?php } ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-lg-3 div-form-right d-none-991">
                    <div class="container-informativo page-detalhe-imovel">
                        <div class="box-informativo">
                            <div class="sidebar-left-item pb-0">
                                <div class="img">
                                    <?php if ($imovel->dn_img != "") { ?>
                                        <img src="<?php e(base_url('modules/anunciante/'.$imovel->id_cadastro.'/perfil/'.$imovel->dn_img)); ?>" class="rounded-circle dono-imovel" alt="<?php e($imovel->dn_nome_nomefantasia); ?>" >
                                    <?php } else {?>
                                        <img src="<?php e(base_url('assets/img/comdono/icons/meus-dados.png')); ?>" class="rounded-circle dono-imovel" alt="<?php e($imovel->dn_nome_nomefantasia); ?>" >
                                    <?php } ?>
                                </div>
                                <div class="text text-blue mt-10">
                                    <span class="nome-dono">
                                    Dono: <?php e(current(str_word_count($imovel->dn_nome_nomefantasia,1))); ?>
                                    </span>
                                </div>
                            </div>
                            <div class="sidebar-left-item pt-0">
                                <div class="box-cta-imovel">
                                    <img src="<?php e(base_url('assets/img/comdono/icons/act-chat-w.png')); ?>" class="img-fluid" alt="Converse com o dono">
                                    Converse com o dono
                                </div>
                            </div>
                            <?php if (($imovel->val_condominio !== "0.00") || ($imovel->val_iptu !== "0.00") || ($imovel->imovel_canto !== "")) { ?>
                            <div class="sidebar-left-item border-separator-top">
                                <div class="text w-100">
                                    <h3>Outras informações</h3>
                                    <ul class="outras-infors">
                                        <?php if ($imovel->val_condominio !== "0.00") { ?>
                                        <li>Condomínio: <span>R$ <?php e(number_format($imovel->val_condominio, 2, ',', '.')); ?>/mês</span></li>
                                        <?php } ?>
                                        <?php if (($imovel->val_iptu !== "0.00")) { ?>
                                        <li>IPTU: <span>R$ <?php e(number_format($imovel->val_iptu, 2, ',', '.')); ?>/ano</span></li>
                                        <?php } ?>
                                        <?php if (($imovel->imovel_canto !== "")) { ?>
                                        <li>Imóvel de canto: <span><?php e($imovel->imovel_canto == "Sim" ? "Sim" : "Não"); ?></span></li>  
                                        <?php } ?>                          
                                    </ul>
                                </div>
                            </div>
                            <?php } if($imovel->caracteristicas !== ""){ ?>
                            <div class="sidebar-left-item border-separator-top">
                                <div class="text text-justify w-100">
                                    <h3>Mais características</h3>
                                    <?php
                                      $quebra = explode(" ", $imovel->caracteristicas);
                                      $count = count($quebra);
                                        if ( $count > 30)
                                        {
                                        	for($i = 0; $i < 30; $i++)
                                        	{
                                        		echo $quebra[$i]." ";
                                        	}
                                     ?>
                                     <div class="collapse" id="textLeiaMaisDt">
                                     <?php 
                                         for($x = 30; $x < $count; $x++)
                                         { 
                                             e($quebra[$x]." "); 
                                         } 
                                     ?>
                                     </div>
                                     <div class="text-right">
                                         <a data-toggle="collapse" class="collapsed" href="#textLeiaMaisDt" aria-expanded="false">Leia mais <i class="fa" aria-hidden="true"></i></a>
                                     </div>
                                      <?php
                                        }
                                        else
                                        {
                                        	e($imovel->caracteristicas);
                                        }
                                     ?>
                                </div>
                            </div>
                            <?php } ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>