'use strict';

/**
 * @ngdoc service
 * @name annotationAppApp.currentSession
 * @description
 * # currentSession
 * Service in the annotationAppApp.
 */

const MODULE_NAME = 'app';
angular.module(MODULE_NAME)
	.service('CurrentSession', function() {

		var Service;

		Service = {
			state: {
				currentProduct: null
			},
			getCurrentProduct: function() {
				return Service.state.currentProduct;
			},
			setCurrentProduct: function(product) {
				// var tmp;

				// tmp = Utils.enrichAssignedProductsWithProductInformation(User.get().assignedProducts || null, [product]);
				// tmp = tmp[0];
				Service.state.currentProduct = product;
			},
			get: function() {
				return Service.state;
			}
		};

		return Service;
	});
