
export default function *() {
	// Get current store from state or else set a default if it exists
	var store = this.getState('Tips', {
		tipsMode: false,
		tips: '',
		samples: []
	});

	this.on('store.Tips.setTips', function *(tips, samples) {
		var store = this.getState('Tips');

		if (tips) {
			store.tipsMode = true;
			store.tips = tips;
		}

		store.samples = samples || [];
		
		// Notify view that time to update
		this.dispatch('store.Tips', 'change');
	});

	this.on('store.Tips.clearTips', function *() {
		var store = this.getState('Tips');
		
		store.tipsMode = false;
		store.tips = null;
		store.sample = [];
		
		// Notify view that time to update
		this.dispatch('store.Tips', 'change');
	});
};
