{% import '_snippets/components/macros/date.html.twig' as dateMacros %}{% set companiesWithFullWeb = getCompaniesWithFullWeb() %}{% set companiesWithFullWebIds = companiesWithFullWeb|map(c => c.id) %}<div class="other-departures-view other-departures-view--table is-active" data-view-panel="table"><div class="pricing-table-wrapper"><div class="pricing-table-scroll"><table class="pricing-table"><colgroup><col class="pricing-table-col-sticky"><col class="pricing-table-col-arrow">{% for departureCruise in allDepartures %}<col class="pricing-table-col-date">{% endfor %}<col class="pricing-table-col-arrow"></colgroup><thead><tr><th scope="col" class="pricing-table-corner sticky-col"><span class="text-md-sbd color-primary-color">{{ 'details.cabin_choice.pricing_table.double_occupancy_rates'|trans }}</span><span class="text-xs-rg color-grey-text">{{ 'details.cabin_choice.pricing_table.mandatory_service_fees'|trans }}</span></th><th scope="col" class="pricing-table-arrow-col pricing-table-arrow-col--left sticky-arrow-col" aria-hidden="true"></th>{% for departureCruise in allDepartures %}{% set isSelectedDeparture = departureCruise.departureDate and currentCruise.departureDate and departureCruise.departureDate|date('Y-m-d') == currentCruise.departureDate|date('Y-m-d') %}{% set departureMonth = departureCruise.departureDate ? departureCruise.departureDate|date('n') : 0 %}<th scope="col" class="pricing-table-header{% if isSelectedDeparture %} is-selected{% endif %}" data-departure-index="{{ loop.index0 }}"><span class="date text-sm-md">{% if departureCruise.departureDate %}{{ departureCruise.departureDate|date('d') }}{{ dateMacros.short_month_fr(departureMonth) }}{{ departureCruise.departureDate|date('Y') }}{% endif %}</span>{% if isSelectedDeparture %}<span class="selected-label text-2xs-rg color-grey-text">{{ 'details.cabin_choice.pricing_table.selected_departure'|trans }}</span>{% endif %}</th>{% endfor %}<th scope="col" class="pricing-table-arrow-col pricing-table-arrow-col--right sticky-arrow-col-right" aria-hidden="true"></th></tr></thead><tbody>{% for subType in subTypes %}{% set subtypeShortLabel = subType.shortName|default('')|trim %}{% if subtypeShortLabel is empty %}{% set subtypeShortLabel = subType.name|default('')|trim %}{% endif %}{% if subtypeShortLabel is empty %}{% set subtypeShortLabel = '%02d'|format(loop.index0) %}{% endif %}{% set cabinTypeId = subtypeCabinTypeMap[subType.id ~ '']|default(subType.cabinType.id|default('')) %}{% set tableModalMinPrice = null %}{% for departureCruise in allDepartures %}{% set bestPriceObj = getBestPriceForCruiseCabinSubType(departureCruise, subType) %}{% set priceValue = bestPriceObj ? bestPriceObj.baseCostDouble|default(0)|round(0, 'ceil') : 0 %}{% if priceValue > 0 and (tableModalMinPrice is null or priceValue < tableModalMinPrice) %}{% set tableModalMinPrice = priceValue %}{% endif %}{% endfor %}<tr><th scope="row" class="pricing-table-row-label sticky-col" data-subtype-id="{{ subType.id }}">{% embed 'pages/_includes/partials/_cabin-modal-link.html.twig' with {cabinTypeId: cabinTypeId,subTypeId: subType.id,linkClass: 'pricing-table-row-label-link',modalMinPrice: tableModalMinPrice} %}{% block link_content %}<span class="subtype-code text-xs-bd">{{ subtypeShortLabel }}</span><span class="subtype-name text-md-sbd">{{ getLucidIcon('info') }} {{ subType.name }}</span>{% endblock %}{% endembed %}</th>{% if loop.first %}<td class="pricing-table-arrow-col pricing-table-arrow-col--left sticky-arrow-col" rowspan="{{ subTypes|length }}"><button type="button" class="arrow left-arrow br1" aria-label="{{ 'details.cabin_choice.pricing_table.scroll_left'|trans }}"><div class="icon">{{ getLucidIcon('chevron-left') }}</div></button></td>{% endif %}{% for departureCruise in allDepartures %}{% set isSelectedDeparture = departureCruise.departureDate and currentCruise.departureDate and departureCruise.departureDate|date('Y-m-d') == currentCruise.departureDate|date('Y-m-d') %}{% set cellBestPriceObj = getBestPriceForCruiseCabinSubType(departureCruise, subType) %}{% set rawBestPrice = cellBestPriceObj ? cellBestPriceObj.baseCostDouble|default(0)|round(0, 'ceil') : 0 %}{% set departureCompany = departureCruise.ship.company|default(null) %}{% set departureCompanyName = departureCompany.name|default('') %}{% set hasDirectOnline = departureCompany.id|default(null) in companiesWithFullWebIds %}<td class="pricing-table-cell{% if rawBestPrice <= 0 %} is-full{% endif %}{% if isSelectedDeparture %} is-selected{% endif %} {{ rawBestPrice == bestUpComingPrice ? 'is-best-price' : '' }}" data-departure-index="{{ loop.index0 }}">{% if rawBestPrice > 0 %}{% set departureDateLabel = departureCruise.departureDate ? departureCruise.departureDate|date('d/m/Y') : '' %}{% set dddUrl = 'details/reservation?croisiere=' ~ departureCruise.id ~ '&type=' ~ cabinTypeId ~ '&subtype=' ~ subType.id %}<buttontype="button"class="pricing-table-cell-link"data-cruise-id="{{ departureCruise.id }}"data-subtype-id="{{ subType.id }}"data-cabin-type-id="{{ cabinTypeId }}"data-price="{{ rawBestPrice }}"data-departure-date="{{ departureDateLabel }}"data-subtype-name="{{ subType.name }}"data-company-name="{{ departureCompanyName }}"data-direct-online="{{ hasDirectOnline ? '1' : '0' }}"data-ddd-url="{{ dddUrl }}"data-reservation-url="{{ dddUrl }}"aria-label="{{ 'details.type_of_quote.open_for'|trans({'%cabin%': subType.name, '%date%': departureDateLabel}) }}"><span class="from text-sm-rg color-grey-text">{{ 'details.cabin_choice.pricing_table.from_label'|trans }}</span><span class="value text-lg-sebd color-price-tags-primary">{{ rawBestPrice|number_format(0, ',', ' ') }} €</span></button>{% else %}<div class="pricing-table-cell-link pricing-table-cell-link--static"><span class="full text-md-bd color-grey">{{ 'details.cabin_choice.pricing_table.full'|trans }}</span></div>{% endif %}</td>{% endfor %}{% if loop.first %}<td class="pricing-table-arrow-col pricing-table-arrow-col--right sticky-arrow-col-right" rowspan="{{ subTypes|length }}"><button type="button" class="arrow right-arrow br1" aria-label="{{ 'details.cabin_choice.pricing_table.scroll_right'|trans }}"><div class="icon">{{ getLucidIcon('chevron-right') }}</div></button></td>{% endif %}</tr>{% endfor %}</tbody></table></div></div></div>