package app;

import org.primefaces.model.menu.DefaultMenuItem;
import org.primefaces.model.menu.DefaultMenuModel;
import org.primefaces.model.menu.DefaultSubMenu;
import org.primefaces.model.menu.MenuModel;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 * Created by Petr Flégl on 20.2.2017.
 */
@ManagedBean
@SessionScoped
public class MenuBean {

    private MenuModel model = new DefaultMenuModel();

    public MenuBean() {


        DefaultSubMenu firstSubmenu = new DefaultSubMenu();

        DefaultMenuItem item = new DefaultMenuItem();
        item = new DefaultMenuItem("Hlavni plocha");
        item.setUrl("Overview.xhtml");
        item.setIcon("ui-icon-home");
        model.addElement(item);


        item = new DefaultMenuItem("Motor");
        item.setUrl("Engine.xhtml");
        item.setIcon("ui-icon-wrench");
        model.addElement(item);



        item = new DefaultMenuItem("Biologie");
        item.setUrl("Biology.xhtml");
        item.setIcon("ui-icon-notice");
        model.addElement(item);


        item = new DefaultMenuItem("Olej");
        item.setUrl("Oil.xhtml");
        item.setIcon("ui-icon-gear");
        model.addElement(item);


        item = new DefaultMenuItem("Elektro");
        item.setUrl("Electric.xhtml");
        item.setIcon("ui-icon-battery-2");
        model.addElement(item);


        item = new DefaultMenuItem("Evidence");
        item.setUrl("Evidence.xhtml");
        item.setIcon("ui-icon-clipboard");
        model.addElement(item);

    }

    public MenuModel getModel() {
        return model;
    }
}