(function() {
	"use strict";

	window.app.directive('inventoryInfo',
		function() {
			return {
				scope: { "inventory": "=" },
				templateUrl: '/inventory/template/inventoryInfo.tmpl.cshtml',
				controller: controller,
				controllerAs: 'vm'
			}
		});

	controller.$inject = ['$scope', 'inventorySvc'];
	function controller($scope, inventorySvc) {
		var vm = this;
		vm.inventory = $scope.inventory;

		vm.isShredReady = function () { return inventorySvc.isShredReady(vm.inventory); };

		vm.isInInventory = function() { return vm.inventory.quantity > 0; }
	}
})();