///<reference path=".#ts/client.d.ts" />

interface Templates {
	betSettleNotification: Template;
}

Template.betSettleNotification.onRendered(function(){
	var self: Notifications.NotificationClient = <any>this.data;
	var betIds = Session.get('notificationBets') || [];
	betIds.push(self.options.content);
	Session.set('notificationBets', _.uniq(betIds));
});

Template.betSettleNotification.helpers({

	bet: function() {
		var self: Notifications.NotificationClient = <any>this;
		return Betting.Bet.db.findOne(self.options.content);
	}

});