Structure Navigation with 3 possible Link Types using Nav tag
I am doing something similar in using a Structure for the main navigation.  Below is what I have.  Hope it helps!
{% set menu = craft.entries.section('navMain').all() %}
&lt;ul&gt; 
{% nav link in menu %}
    &lt;li&gt;
    {% if link.menuEntry|length %}
        {% if craft.app.request.absoluteUrl ==  link.menuEntry[0].url %}
        &lt;a href=&quot;{{ link.menuEntry[0].url }}&quot; class=&quot;active&quot;&gt;{{ link.title }}&lt;/a&gt;
        {% else %}
            &lt;a href=&quot;{{ link.menuEntry[0].url }}&quot;&gt;{{ link.title }}&lt;/a&gt;
         {% endif %}
    {% else %}
        {% if craft.app.request.absoluteUrl ==  link.menuCustomURL %}
            &lt;a href=&quot;{{ link.menuCustomURL }}&quot; class=&quot;active&quot;&gt;{{ link.title }}&lt;/a&gt;
        {% else %}
            &lt;a href=&quot;{{ link.menuCustomURL }}&quot;&gt;{{ link.title }}&lt;/a&gt;
        {% endif %}
    {% endif %}
    {% ifchildren %}
        &lt;ul&gt;
            {% children %}
        &lt;/ul&gt;
    {% endifchildren %}
    &lt;/li&gt; 
{% endnav %}
&lt;/ul&gt;