<?php

namespace App\Menu;

use Sebastienheyd\Boilerplate\Menu\Builder;
use App\Repositories\Users;

class Botanic
{
    public function make(Builder $menu)
    {
        $menu->add('Botanique', ['icon' => 'leaf' ])
            ->id('botanic')
            ->order(4);

        $menu->addTo('botanic', 'Familles', [
            'route' => 'Admin.Botanic.Families.index',
        ])->activeIfRoute(['Admin.Botanic.Families.*'])->order(1);
        
        $menu->addTo('botanic', 'Genres', [
            'route' => 'Admin.Botanic.Genres.index',
        ])->activeIfRoute(['Admin.Botanic.Genres.*'])->order(2);
        
        $menu->addTo('botanic', 'Espèces', [
            'route' => 'Admin.Botanic.Species.index',
        ])->activeIfRoute(['Admin.Botanic.Species.*'])->order(3);
        
        $menu->addTo('botanic', 'Variétés', [
            'route' => 'Admin.Botanic.Varieties.index',
        ])->activeIfRoute(['Admin.Botanic.Varieties.*'])->order(4);
    }
}
