<?xml version="1.0"?>
<t t-name="event.event_report_template_four_per_sheet_badge">
    <t t-if="example_badge" t-foreach="[(0, 1), (2, 3)]" t-as="indices_pair">
        <div t-att-class="'row' + (' o_event_badge_report_page_break' if indices_pair_index else '')">
            <div t-foreach="indices_pair" t-as="attendee_number" class="col-6 o_event_badge_height pt-2">
                <t t-call="event.event_report_template_badge_card"/>
            </div>
        </div>
    </t>
    <t t-if="not example_badge" t-foreach="[attendees[n:n+2] for n in range(0, len(attendees), 2)] if attendees else []" t-as="attendee_pair">
        <t t-set="do_page_break" t-value="attendee_pair_index &gt; 0 and attendee_pair_index % 2 or (attendee_pair_index + 1) * 2 &gt;= len(attendees)"/>
        <div t-att-class="'row' + (' o_event_badge_report_page_break' if do_page_break else '')">
            <div t-foreach="attendee_pair" t-as="attendee" class="col-6 o_event_badge_height pt-2">
                <t t-call="event.event_report_template_badge_card"/>
            </div>
        </div>
    </t>
</t>

