<?xml version="1.0"?>
<data inherit_id="website_sale.confirmation">
        <div id="order_name" position="after">
            <t t-if="events">
                <section class="card" t-foreach="events" t-as="event">
                    <t t-set="attendees" t-value="attendee_ids_per_event.get(event, [])"/>
                    <div class="s_nb_column_fixed s_col_no_bgcolor o_wevent_index o_wevent_sale_event">
                        <t t-set="opt_event_description_cover_top" t-value="is_view_active('website_event.opt_event_description_cover_top')"/>
                        <t t-call="website.record_cover">
                            <t t-set="_record" t-value="event"/>
                            <t t-set="use_filters" t-value="True"/>
                            <t t-set="use_size" t-value="True"/>
                            <t t-set="use_text_align" t-value="True"/>
                            <t t-set="additionnal_classes" t-value="'o_wevent_event_main_cover o_wevent_event_main_cover_top overflow-hidden h-auto'"/>

                            <a class="text-decoration-none" t-att-href="event.event_url or event.website_url">
                                <div t-if="not event.is_multi_slots" t-attf-class="o_wevent_event_date position-absolute shadow-sm o_not_editable">
                                    <span t-out="event.date_begin" t-options="{'widget': 'datetime', 'tz_name': event.date_tz, 'format': 'LLL'}" class="o_wevent_event_month"/>
                                    <span t-out="event.date_begin" t-options="{'widget': 'datetime', 'tz_name': event.date_tz, 'format': 'dd'}" class="o_wevent_event_day oe_hide_on_date_edit"/>
                                </div>

                                <div class="container d-flex flex-grow-1 h-100 w-100">
                                    <div id="o_wevent_event_main_cover_content" class="d-flex flex-column align-items-baseline w-100 p-3">
                                        <span t-if="event.is_participating" class="badge text-bg-success o_wevent_badge">
                                            <i class="fa fa-check me-2" role="img"/>Registered
                                        </span>
                                        <div class="w-100 mt-auto">
                                            <h2 t-field="event.name" itemprop="name" placeholder="Event Title" class="mt-3"/>
                                            <p class="lead" t-field="event.subtitle" placeholder="Event Subtitle"/>
                                        </div>
                                    </div>
                                </div>
                            </a>
                        </t>
                        <t t-set="event_attendees" t-value="attendee_ids_per_event.get(event, [])"/>
                        <div t-if="event_attendees or not event.is_multi_slots" class="m-3">
                            <t t-if="event_attendees and not event.is_multi_slots">
                                <t t-call="website_event.registration_ticket_access">
                                    <t t-set="attendees" t-value="event_attendees"/>
                                </t>
                            </t>
                            <div t-elif="event_attendees" t-foreach="event_attendees" t-as="slot" class="mb-4">
                                <div t-attf-class="d-flex flex-column flex-md-row justify-content-between mt-2">
                                    <div class="mb-3">
                                        <div class="row">
                                            <div class="col-auto">
                                                <b>Start</b>
                                            </div>
                                            <div class="col-auto ps-0">
                                                <span t-out="slot.start_datetime" t-options="{&quot;widget&quot;: &quot;datetime&quot;, &quot;show_seconds&quot;: False, &quot;tz_name&quot;: event.date_tz, &quot;format&quot;: &quot;medium&quot;}"/>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-auto">
                                                <b>End</b>
                                            </div>
                                            <div class="col-auto ps-0">
                                                <span t-out="slot.end_datetime" t-options="{&quot;widget&quot;: &quot;datetime&quot;, &quot;show_seconds&quot;: False, &quot;tz_name&quot;: event.date_tz, &quot;format&quot;: &quot;medium&quot;}"/>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <span t-if="website_visitor_timezone != event.date_tz" class="small">(<t t-out="event.date_tz"/>)</span>
                                        </div>
                                    </div>
                                    <div t-if="event_attendees[slot]" t-call="website_event.registration_ticket_access">
                                        <t t-set="attendees" t-value="event_attendees[slot]"/>
                                    </div>
                                </div>
                                <t t-call="website_event.event_calendar_links">
                                    <t t-set="iCal_url" t-value="urls_per_event.get(event.id, {}).get(slot.id, {}).get('iCal_url', '')"/>
                                    <t t-set="google_url" t-value="urls_per_event.get(event.id, {}).get(slot.id, {}).get('google_url', '')"/>
                                </t>
                            </div>
                            <div t-if="not event.is_multi_slots" class="row my-3">
                                <t t-call="website_event.event_calendar_links">
                                    <t t-set="iCal_url" t-value="urls_per_event.get(event.id, {}).get('iCal_url', '')"/>
                                    <t t-set="google_url" t-value="urls_per_event.get(event.id, {}).get('google_url', '')"/>
                                </t>
                            </div>
                            <t t-call="website_event.event_confirmation_end_page_hook"/>
                        </div>
                    </div>
                </section>
            </t>
        </div>
    </data>

