<?xml version="1.0"?>
<data name="Survey Layout" inherit_id="web.frontend_layout" primary="True">
        <xpath expr="//div[@id='wrapwrap']" position="before">
            <!--TODO DBE Fix me : If one day, there is a survey_livechat bridge module, put this in that module-->
            <t t-set="no_livechat" t-value="True"/>
        </xpath>
        <xpath expr="//div[@id='wrapwrap']" position="attributes">
            <attribute name="t-att-style" add="(('background-image: url(' + question.background_image_url + ');')                              if question and question.background_image_url                              else ('background-image: url(' + page.background_image_url + ');')                              if page and page.background_image_url                              else ('background-image: url(' + survey.background_image_url + ');')                              if survey and survey.background_image_url                              else '')"/>
            <attribute name="t-att-class" add="(('o_survey_background o_survey_background_shadow')                              if (question and question.background_image_url)                              or (page and page.background_image_url)                              or (survey and survey.background_image_url)                              else 'o_survey_background')" separator=" "/>
        </xpath>
        <xpath expr="//head/t[@t-call-assets][last()]" position="after">
            <t t-call-assets="survey.survey_assets" lazy_load="True"/>
        </xpath>
        <xpath expr="//header" position="before">
            <t t-set="no_header" t-value="True"/>
            <t t-set="no_footer" t-value="True"/>
        </xpath>
        <xpath expr="//header" position="after">
            <div id="wrap" class="oe_structure oe_empty"/>
        </xpath>
        <xpath expr="//footer" position="after">
            <div class="py-3 m-0 p-0 text-end">
                <div class="o_survey_progress_wrapper d-inline-block pe-1 text-start">
                    <t t-call="survey.survey_progression" t-if="survey and survey.questions_layout != 'one_page' and answer and answer.state == 'in_progress' and (not question or not question.is_page) and not survey_form_readonly">
                        <t t-if="survey.questions_layout == 'page_per_section'">
                            <t t-set="page_ids" t-value="survey.page_ids.ids"/>
                            <t t-set="page_number" t-value="page_ids.index(page.id) + (1 if survey.progression_mode == 'number' else 0)"/>
                        </t>
                        <t t-else="">
                            <t t-if="not answer.is_session_answer and survey.questions_selection == 'random'">
                                <t t-set="page_ids" t-value="answer.predefined_question_ids.ids"/>
                            </t>
                            <t t-else="">
                                <t t-set="page_ids" t-value="survey.question_ids.ids"/>
                            </t>
                            <t t-set="page_number" t-value="page_ids.index(question.id)"/>
                        </t>
                    </t>
                </div>
                <div class="o_survey_brand_message float-end rounded me-3 border">
                    <div class="px-2 py-2 d-inline-block" t-call="web.brand_promotion_message">
                        <t t-set="_message"/>
                        <t t-set="_utm_medium" t-valuef="survey"/>
                    </div>
                    <div class="o_survey_navigation_wrapper d-inline-block" t-call="survey.survey_navigation">
                    </div>
                </div>
            </div>
        </xpath>
    <xpath expr="." position="attributes"><attribute name="t-name">survey.layout</attribute></xpath></data>

    