{namespace neos=Neos\Neos\ViewHelpers}
{namespace meta=Newland\NeosMetaTags\ViewHelpers}

<div class="o-container">
    <f:if condition="{items}">
        <div class="c-breadcrumb {f:if(condition: showBreadcrumbOnMobile, then: 'c-breadcrumb--active-mobile')}" aria-labelledby="{node.identifier}">
            <ul class="c-breadcrumb__list">
                <f:for each="{items}" as="item" reverse="TRUE" iteration="i">
                    <li class="c-breadcrumb__item">
                        <f:if condition="{i.cycle} == 1">
                            <f:then>
                                <a href="/">
                                    <f:translate id="breadcrumb.home" package="Newland.CityTheme" source="Main"/>
                                </a>
                                <svg class="c-icon">
                                    <use xlink:href="#icon-angle-right"></use>
                                </svg>
                            </f:then>
                            <f:else>
                                <f:if condition="{item.state} == 'current' && {i.cycle} != 1">
                                    <f:then>
                                        <a aria-current="page">
                                            {item.label}
                                        </a>
                                    </f:then>
                                    <f:else>
                                        {neos:link.node(node: item.node)}
                                    </f:else>
                                </f:if>
                                <f:if condition="!{i.isLast}">
                                    <svg class="c-icon">
                                        <use xlink:href="#icon-angle-right"></use>
                                    </svg>
                                </f:if>
                            </f:else>
                        </f:if>
                    </li>
                </f:for>
            </ul>
        </div>
    </f:if>
</div>
