define(['vue', 'constant'], function(Vue, Constant){
	Vue.component('dataset-radio', {
		props: ['dataset'],
		template: '<div>\
				   <div class="radio" v-for="value in datasets">\
					<label>\
						<input type="radio" name="dataset" v-model="pick" v-bind:value="value" v-on:click="onClick($event.target.value)"/>\
						{{toUpperCase(value)}}\
					</label>\
				   </div>\
				  </div>',
		data: function(){
			return {
				pick: this.dataset,
				datasets: Constant.DATASET_TYPE
			}
		},
		methods: {
			toUpperCase: function(v){
				return v.toUpperCase();
			},
			onClick: function(dataset){
				this.$emit('dataset-change', dataset);
			}
		}
	});
});