(function() {
	'use strict';

	window.app.controller('InventoryListController', InventoryListController);

	InventoryListController.$inject = ['$uibModal', 'inventorySvc'];
	function InventoryListController($uibModal, inventorySvc) {
		var vm = this;

		vm.add = add;
		vm.distribute = distribute;
		vm.inventories = inventorySvc.inventories;

		function add() {
			$uibModal.open({
				template: '<inventory-add />',
				backdrop: 'static'
			});
		}

		function distribute() {
			$uibModal.open({
				template: '<inventory-distribute />',
				backdrop: 'static'
			});
		}
	}
})();