<?php
    /**
     * @var AppView $this
     *
     */

    use App\View\AppView;
    use Cake\Utility\Inflector;


?>
<!-- Navigation -->
<?php

    $nav = 'default';

    $userGroup = $this->Auth->getUser()?->get('user_group')?->get('handle') ?? null;
    if ($userGroup) {
        if ($this->elementExists("Icing.nav/{$userGroup}")) {
            $nav = $userGroup;
        }
    }

    echo $this->element("Icing.nav/$nav");

?>
<!-- End of Navigation -->
