{{define "mainmenu"}}

{{range .LayoutState.Menu}}
{{if moduleAvailable .name }}
<nav class="px-2 space-y-1">
    <a href="{{.link}}"
        {{ if eq .name $.LayoutState.ActiveMenu }}
        class="bg-white text-co-blue group flex items-center px-2 py-2 text-base font-medium rounded-2xl">
        {{ else}}
        class="text-white hover:bg-white hover:bg-opacity-5 hover:text-co-blue group flex items-center px-2 py-2 text-base font-medium rounded-2xl">
        {{end}}

        {{$.IconSet.Icon .icon "mr-4 flex-shrink-0 h-6 w-6"}}
        
        {{.title}}
    </a>
</nav>
{{end}}
{{end}}
{{end}}
