{namespace neos=Neos\Neos\ViewHelpers}

<ul class="c-footer-menu">
    <f:for each="{items}" as="item" iteration="menuItemIterator">
        <li class="c-footer-menu__item">
            <f:if condition="{item.state} == 'current'">
                <f:then>
                    <neos:link.node node="{item.node}" additionalAttributes="{'aria-current': 'page'}" class="c-footer-menu__link">
                        <svg class="c-footer-menu__icon c-icon">
                            <use xlink:href="#icon-angle-right"></use>
                        </svg>
                        {item.label}
                    </neos:link.node>
                </f:then>
                <f:else>
                    <f:if condition="{item.node.properties.openInNewTab}">
                        <f:then>
                            <neos:link.node node="{item.node}" class="c-footer-menu__link" target="_blank" rel="noopener noreferrer">
                                <svg class="c-footer-menu__icon c-icon">
                                    <use xlink:href="#icon-angle-right"></use>
                                </svg>
                                <span>{item.label}</span>
                            </neos:link.node>
                        </f:then>
                        <f:else>
                            <neos:link.node node="{item.node}" class="c-footer-menu__link">
                                <svg class="c-footer-menu__icon c-icon">
                                    <use xlink:href="#icon-angle-right"></use>
                                </svg>
                                <span>{item.label}</span>
                            </neos:link.node>
                        </f:else>
                    </f:if>
                </f:else>
            </f:if>
        </li>
    </f:for>
</ul>
