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