<?php

namespace App\Menu;

use Sebastienheyd\Boilerplate\Menu\Builder;

class Orders
{
    public function make(Builder $menu)
    {
        $menu->add('Commandes', ['permission' => 'backend_access', 'icon' => 'shopping-basket'])
            ->id('orders')
            ->activeIfRoute('orders')
            ->order(1);

        $menu->addTo('orders', 'Commandes', [
            'route' => 'Admin.Shop.Orders.index',
            'permission' => 'backend_access',
        ])->activeIfRoute(['Admin.Shop.Orders.*'])->order(1);

        $menu->addTo('orders', 'Factures', [
            'route' => 'Admin.Shop.Invoices.index',
            'permission' => 'backend_access',
        ])->activeIfRoute(['Admin.Shop.Invoices.*'])->order(2);
        /*
                $menu->addTo('orders', 'Avoirs', [
                    'route' => 'Admin.Shop.Invoices.index',
                    'permission' => 'backend_access',
                ])->activeIfRoute(['Admin.Shop.Invoices.*'])->order(3);

                $menu->addTo('orders', 'Bons de livraison', [
                    'route' => 'Admin.Shop.Invoices.index',
                    'permission' => 'backend_access',
                ])->activeIfRoute(['Admin.Shop.Invoices.*'])->order(4);
        */
    }
}
