{% sw_extends '@Storefront/storefront/layout/footer/footer.html.twig'%}

{% block layout_footer_inner_container %}
{% set bctfooterColumnWidth = theme_config('theme-footer-column-width') %}
{% set activateCopyright = theme_config('theme-footer-activate-copyright')  %}
{% set activatePayment = theme_config('theme-footer-activate-payment') %}
{% set activateshipping = theme_config('theme-footer-activate-shipping') %}
{% set activateInfo = theme_config('theme-footer-activate-info') %}
{% set activateSocial = theme_config('theme-footer-activate-socials') %}

<div class="container">
	{% block layout_footer_navigation %}
		<div 
			id="footerColumns" 
			class="row footer-columns" 
			data-collapse-footer-columns="true" 
			role="list">
			{% block layout_footer_navigation_hotline %}
				{% if activateInfo %}
					<div class="col-md-4 footer-column js-footer-column bc-find-us">
						{% block layout_footer_navigation_hotline_headline %}
							 {{ parent() }}
						{% endblock %}
						{% block layout_footer_navigation_hotline_content %}
							{% set cmsPath = 'frontend.cms.page.full' %}
							<div id="collapseFooterHotline"
                                 class="footer-column-content collapse js-footer-column-content footer-contact mb-4 mb-md-0"
                                 aria-labelledby="collapseFooterHotlineTitle"
                                 role="listitem">
								<div class="footer-column-content-inner">
									{% sw_include "@Storefront/storefront/Aquapages/layout/footer/infobox.html.twig" %}
								</div>
							</div>
						{% endblock %}
					</div>
				{% endif %}
			{% endblock %}
			{% block layout_footer_navigation_columns %}
				{% for root in footer.navigation.tree %}
					{% block layout_footer_navigation_column %}
						{% if bctfooterColumnWidth == "1" %}
							<div class="col-md-4 footer-column js-footer-column">
							{% endif %}
							{% if bctfooterColumnWidth == "2" %}
								<div class="col-bc-4 col-md-4 footer-column js-footer-column">
								{% endif %}
								{% block layout_footer_navigation_information_headline %}
									{{ parent() }}
								{% endblock %}

								{% block layout_footer_navigation_information_content %}
									{{ parent() }}
								{% endblock %}
							</div>
						{% endblock %}
					{% endfor %}
				{% endblock %}
			</div>
		{% endblock %}
		<div class="row">
			{% if activateSocial %}
				<div class="col-md-4 footer-column">
					{% sw_include "@Storefront/storefront/Aquapages/layout/footer/social.html.twig" %}
				</div>
			{% endif %}
			{% if activatePayment %}
				<div class="col-md-4 footer-column">
					{% block layout_footer_payment_logos %}
						<div class="payment-shipping-logo">
							<div class="logo-container">
								 
									 {% for paymentMethod in footer.paymentMethods %}
										{% block layout_footer_payment_logo %}
											{% if paymentMethod.media %}
												<div class="imgbox">
													{% sw_thumbnails 'footer-payment-image-thumbnails' with
																{
																	media: paymentMethod.media,
																	sizes: {
																	default: '100px'
																	},
																	attributes: {
																		class: 'img-fluid',
																		alt: paymentMethod.media.translated.alt ? : paymentMethod.translated.name, 
																		title: paymentMethod.media.translated.title ? : paymentMethod.translated.name
																	}
																}														
															%}
												</div>
											{% else %}
												<div title="{{ paymentMethod.translated.name }}" class="footer-logo is-payment no-image">
													{{ paymentMethod.translated.name }}
												</div>
											{% endif %}
										{% endblock %}
									{% endfor %}
								 
							</div>
						</div>
					{% endblock %}
				</div>
			{% endif %}
			{% if activateshipping %}
				<div class="col-md-4 footer-column">
					{% block layout_footer_shipping_logos %}
						<div class="payment-shipping-logo">
							<div class="logo-container">
								 
									{% for shippingMethod in footer.shippingMethods %}
										{% block layout_footer_shipping_logo %}
											{% if shippingMethod.media %}
												<div class="imgbox">
													{% sw_thumbnails 'footer-shipping-image-thumbnails' with 
																	{ 
																		media: shippingMethod.media, 
																		sizes: {
																		default: '100px'
																		},
																		attributes: {
																			class: 'img-fluid',
																			alt: shippingMethod.media.translated.alt ? : shippingMethod.translated.name, 
																			title: shippingMethod.media.translated.title ? : shippingMethod.translated.name 
																		}
																	}
																%}
												</div>
											{% else %}
												<div title="{{ shippingMethod.translated.name }}" class="footer-logo is-payment no-image">
													{{ shippingMethod.translated.name }}
												</div>
											{% endif %}
										{% endblock %}
									{% endfor %}
								 
							</div>
						</div>
					{% endblock %}
				</div>
			{% endif %}
		</div>
		<div class="bc-footer-bottom">
			{% block layout_footer_vat %}
				{{ parent() }}
			{% endblock %}
			{% block layout_footer_service_menu %}
				<div class="container">
					{% block layout_footer_service_menu_content %}
					{{ parent() }}
					{% endblock %}
				</div>
			{% endblock %}
			{% block layout_footer_copyright %}
				{% set cYear = "now"|date("Y") %}
				{% if activateCopyright %}
					<div class="footer-copyright">
						{{ "BrandCrockAquaTheme.footer.copyright"|trans({"%currentYear%": cYear })|sw_sanitize }}
					</div>
				{% endif %}
			{% endblock %}
			
		</div>
	</div>

	{% block layout_footer_bottom %} 
	{% endblock %}
{% endblock %}
