{% extends '_templates/base.twig' %}

{% block head %}
    <meta name="cs:page" content="search">
{% endblock %}

{% block title %}
    {{ page.page_title }}
{% endblock %}

{% block style %}
{% endblock %}

{% block content %}
    {% include '_templates/includes/header.twig' %}

    <section class="main pacote">
        {% include 'pacote/submenu.twig' %}

        {% include '_templates/includes/preloader.twig' %}

        <div data-b2c-content style="display: none">
            <section data-b2c-pagina-pacote>
                {% include 'pacote/pacote.twig' %}
            </section>

        </div>
        <div data-b2c-pagina-error style="display: none">
            <div style="text-align: center;width: 100%;font-size: 20px;margin-top: 10%;" class="conteudo" data-message>
                {{ __('nenhumResultadoEncontrado') }}
            </div>
        </div>
    </section>

    {% include '_templates/includes/footer.twig' %}

{% endblock %}

{% block scripts %}
    <script type="text/javascript">
        /* <![CDATA[ */
        var motorBusca = new MotorBusca(CHAVE_MOTOR, Object.assign(motorConfig, {}));
        {% if tpPesquisa == 'hospedagem' %}
            motorBusca.motorHotel('.pnlMotor.hotel', {
                quarto: {value: '{{ params.config }}'}
            });
        {% elseif tpPesquisa == 'pacote_aereo' %}
            motorBusca.motorPacoteAereo('.pnlMotor.pacoteAereo', {
                quarto: {value: '{{ params.config }}'}
            });
        {% elseif tpPesquisa == 'pacote_hotel' %}
            motorBusca.motorPacoteHotel('.pnlMotor.pacoteHotel', false, null, {
                quarto: {value: '{{ params.config }}'}
            });
        {% elseif tpPesquisa == 'pacote_dinamico' %}
            motorBusca.motorPacoteDinamico('.pnlMotor.pacoteDinamico', {
                quarto: {value: '{{ params.config }}'}
            });
        {% elseif tpPesquisa == 'pacote_rodo_hotel' %}
            motorBusca.motorRodoHotel('.pnlMotor.rodoHotel', {
                quarto: {value: '{{ params.config }}'}
            });
        {% elseif tpPesquisa == 'pacote_rodo_servico' %}
            motorBusca.motorRodoServico('.pnlMotor.rodoServico', {
                quarto: {value: '{{ params.config }}'}
            });
        {% endif %}
        /*]]>*/
    </script>
    <script>
        (function () {
            B2C.pacote.init();
        })();
    </script>
{% endblock %}