{{#unless level}}
<nav>
{{/unless}}
    <ul{{#if level}} class="submenu submenu-level-{{level}}"{{else}} class="menu menu-level-1"{{/if}}>
        {{#each items}}
            <li{{menuItemClasses}}>
            {{#if link}}
            <a href="{{menuUrl}}"{{#if title}} title="{{title}}"{{/if}}{{#if target}} target="{{target}}"{{/if}}>{{label}}</a>
            {{else}}
            <span{{#if title}} title="{{title}}"{{/if}}>{{label}}</span>
            {{/if}}

            {{#if items}}
                {{> menu}}
            {{/if}}
        </li>
        {{/each}}
    </ul>
{{#unless level}}
</nav>
{{/unless}}
