define(['underscore'],function(_){'use strict';return{cookies:[],isEssential:function(cookieName){return this.cookies.indexOf(cookieName)!==-1;},update:function(groups){if(!this.cookies.length){_.each(groups,function(group){if(group.isEssential){this.set(group.cookies);}}.bind(this));}},set:function(cookies){cookies.forEach(function(item){this.cookies.push(item.name);}.bind(this));}};});