{% from '@openform_front_templates/_includes/_icons.html.twig' import facebook, instagram, youtube, logo %}
{% set config = openform_front_util.getConfig() %}
<footer class="footer">
<h3 class="visuallyhidden">{{ config.Translation[app.request.locale].footerContactTitle }}</h3>
<div class="footer-wrapper">
<div class="footer-wrapper__section-light">
<div class="footer-wrapper__section-light__content">
<div class="footer-wrapper__section-light__content">
<div class="footer-content">
<div class="footer-content__logo">
{% if openform_front_util.config.footerLogoPath is defined and openform_front_util.config.footerLogoPath %}
<img src="{{openform_front_util.config.footerLogoPath}}" alt="logo">
{% endif %}
</div>
<span class="footer-content__contact-content block__text">
{{ config.Translation[app.request.locale].footerContactText|nl2br }}
{% if config.contactEmail %}
<br />
<a class="footer-content__email block__text" href="mailto:{{ config.contactEmail }}">
{{ config.contactEmail }}
</a>
{% endif %}
</span>
<ul class="footer-content__socials">
{% if config.linkFacebook %}
<li>
<a href="{{ config.linkFacebook }}" target="_blank" rel="noopener noreferrer">
{{facebook()}}
</a>
</li>
{% endif %}
{% if config.linkYoutube %}
<li>
<a href="{{ config.linkYoutube }}" target="_blank" rel="noopener noreferrer">
{{youtube()}}
</a>
</li>
{% endif %}
{% if config.linkInstagram %}
<li>
<a href="{{ config.linkInstagram }}" target="_blank" rel="noopener noreferrer">
{{instagram()}}
</a>
</li>
{% endif %}
</ul>
<span class="footer-content__copyright">
{{ config.Translation[app.request.locale].footerCopyrights|nl2br }}
</span>
<span class="footer-content__copyright">Created by <a href="https://openform.pl" target="_blank">Openform</a></span>
</div>
</div>
</div>
</div>
<div class="footer-wrapper__section-dark">
{% if rootParent is not defined %}
<div class="footer-content__menu">
<div class="footer-content__menu__title">
menu
</div>
<ul class="footer-content__menu__links">
{% set footMenu = openform_front_util.getFootMenu(app.request.locale) %}
{% for item in footMenu %}
<a href="{{ item.Translation[app.request.locale].link ?? toolkit_route_localizer.generate('page', { slug : item.Translation[app.request.locale].slug }, app.request.locale) }}" rel="noopener noreferrer"
{{ item.blank ? 'target="_blank"'}}
>
{{ item.Translation[app.request.locale].title|raw|nl2br}}
</a>
{% endfor %}
</ul>
</div>
{% endif %}
{% if rootParent is defined %}
{% set MenuPageFooterItems = openform_front_util.getMenuPageFooterItems(rootParent) %}
{% endif %}
<div class="footer-content__menu">
{% if MenuPageFooterItems is defined and MenuPageFooterItems|length > 0 %}
<div class="footer-content__menu__title">
na skróty
</div>
{% endif %}
<ul class="footer-content__menu__links">
{% if MenuPageFooterItems is defined and MenuPageFooterItems|length > 0 %}
{% set rootParentSlug = app.request.attributes.get('rootParentSlug') ?? 'empty-valueno' %}
{% set currentUrl = toolkit_route_localizer.generate('menu_page', {
makSlug: app.request.attributes.get('makSlug'),
rootParentSlug: rootParentSlug,
slug : app.request.attributes.get('slug')
}, app.request.locale) %}
{% for item in MenuPageFooterItems %}
{% set href = toolkit_route_localizer.generate('menu_page', {
makSlug: app.request.attributes.get('makSlug'),
rootParentSlug: rootParent.Translation[app.request.locale].slug,
slug : item.Translation[app.request.locale].slug
}, app.request.locale) %}
{% set isActive = currentUrl is defined and currentUrl == href %}
<li>
<a
class="main-menu-nav__url"
rel="noopener noreferrer"
href="{{ item.Translation[app.request.locale].link ?? href }}"
title="{{ item.Translation[app.request.locale].metaTitle }}"{{ isActive ? ' active' }}{{ item.targetBlank ? ' target="_blank"' }}
>
{{ item.Translation[app.request.locale].titleHtml|raw }}
</a>
</li>
{% endfor %}
{% endif %}
</ul>
</div>
<div class="footer-content__bottom">
<ul class="footer-content__bottom__links">
{% set footMenu2 = openform_front_util.getFootMenu2(app.request.locale) %}
{% for item in footMenu2 %}
<a href="{{ item.Translation[app.request.locale].link ?? toolkit_route_localizer.generate('page', { slug : item.Translation[app.request.locale].slug }, app.request.locale) }}" rel="noopener noreferrer"
{{ item.blank ? 'target="_blank"'}}
>
{{ item.Translation[app.request.locale].titleHtml|raw}}
</a>
{% endfor %}
</ul>
</div>
</div>
</div>
</footer>