package devopsdistilled.operp.client.context;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import devopsdistilled.operp.client.account.AccountMgmtPane;
import devopsdistilled.operp.client.business.purchases.PurchasesMgmtPane;
import devopsdistilled.operp.client.business.sales.SalesMgmtPane;
import devopsdistilled.operp.client.items.ItemMgmtPane;
import devopsdistilled.operp.client.main.NavigationPane;
import devopsdistilled.operp.client.main.NavigationTree;
import devopsdistilled.operp.client.party.PartyMgmtPane;
import devopsdistilled.operp.client.stock.StockMgmtPane;

@Configuration
public class NavigationContext {

	@Bean
	public PartyMgmtPane partyMgmtPane() {
		return new PartyMgmtPane();
	}

	@Bean
	public ItemMgmtPane itemMgmtPane() {
		return new ItemMgmtPane();
	}

	@Bean
	public StockMgmtPane stockMgmtPane() {
		return new StockMgmtPane();
	}

	@Bean
	public SalesMgmtPane salesMgmtPane() {
		return new SalesMgmtPane();
	}

	@Bean
	public PurchasesMgmtPane purchasesMgmtPane() {
		return new PurchasesMgmtPane();
	}

	@Bean
	public AccountMgmtPane accountMgmtPane() {
		return new AccountMgmtPane();
	}

	@Bean
	public NavigationTree navigationTree() {
		NavigationTree navTree = new NavigationTree();
		navTree.addNode(partyMgmtPane());
		navTree.addNode(itemMgmtPane());
		navTree.addNode(stockMgmtPane());
		navTree.addNode(salesMgmtPane());
		navTree.addNode(purchasesMgmtPane());
		navTree.addNode(accountMgmtPane());

		return navTree;
	}

	@Bean
	public NavigationPane navigationPane() {
		return new NavigationPane();
	}

}

@@ -347,32 +347,95 @@
 .SalesMgmtPane;%0A
+import devopsdistilled.operp.client.employee.EmployeeMgmtPane;%0A
 import devopsdis
@@ -1245,32 +1245,122 @@
 MgmtPane();%0A%09%7D%0A%0A
+%09@Bean%0A%09public EmployeeMgmtPane employeeMgmtPane() %7B%0A%09%09return new EmployeeMgmtPane();%0A%09%7D%0A%0A
 %09@Bean%0A%09public N
@@ -1662,16 +1662,54 @@
 ane());%0A
+%09%09navTree.addNode(employeeMgmtPane());
 %0A%09%09retur

Add Employee Mgmt to Navigation