<template>

	<div id='HEADER'>

		<!-- Version management -->
		<div class='versions'>

			<div class='current' @click='version_dialog=!version_dialog' :data-id='current_version_id'>{{ versions[current_version_id].date || 'version à jour' }}</div>
			<div class='version-dialog' v-show='version_dialog'>
				<span data-id='0' @click='version_dialog=false; current_version_id=0'>version à jour</span>
				<span v-for='v in (1,versions.length-1)' @click='version_dialog=false; current_version_id=v' :data-id='v'>{{ versions[v].date }}</span>
			</div>

		</div>
			<!-- <div class='header-title'>{{ gstore.header_title }}</div> -->

	</div>

</template>


<script>
export default {
	name: 'HEADER',
	data(){
	    return {
	        gstore:			gstore.get,
			is_connected:	_SERVER.session.connected,

			version_dialog: false,
			current_version_id: 0,
			versions: [
				{ date: null         },
				{ date: '01-02-2017' },
				{ date: '23-03-2017' }
			]
	    };
	}
}
</script>