<template>



	<div id="WRAPPER">

		<!-- Side Menu -->
		<menu-comp></menu-comp>

		<!-- Side Dialog -->
		<dialog-comp></dialog-comp>

		<!-- Container -->
		<router-view></router-view>

		<!-- Pop-up Filter Background -->
		<div id='popup-filter-background' v-show='gs.popup.filter' @click='gs.popup.hide()'></div>

		<!-- Pop-up ROOM CREATE -->
		<div class='popup' v-show='gs.popup.get(`room.create`).active'>
			<span class='header'>Create {{ gs.popup.get(`room.create`).data.type }} channel</span>

			<span class='body form'>
				<label for='channel_name'>Room Name</label>
				<input type='text' name='channel_name' v-model='gs.popup.get(`room.create`).data.name'>

				<label for='channel_name'>Room Type</label>
				<span class='select-box' @click='gs.popup.get(`room.create`).data.type=`text`' :data-selected='gs.popup.get(`room.create`).data.type==`text`?1:0' data-type='text'>Text Room</span>
				<span class='select-box' @click='gs.popup.get(`room.create`).data.type=`voice`' :data-selected='gs.popup.get(`room.create`).data.type==`voice`?1:0' data-type='voice'>Voice Room</span>
			</span>

			<span class='footer form'>
				<button @click='gs.popup.hide()'>Cancel</button>
				<button class='submit' @click='gs.popup.get(`room.create`).submit()'>Create Room</button>
			</span>
		</div>

		<!-- Pop-up CHANNEL CREATE -->
		<div class='popup' v-show='gs.popup.get(`channel.create`).active'>
			<span class='header'>Create {{ gs.popup.get(`channel.create`).data.type }} channel</span>

			<span class='body form'>
				<label for='channel_name'>Channel Name</label>
				<input type='text' name='channel_name' v-model='gs.popup.get(`channel.create`).data.name'>
			</span>

			<span class='footer form'>
				<button @click='gs.popup.hide()'>Cancel</button>
				<button class='submit' @click='gs.popup.get(`channel.create`).submit()'>Create Channel</button>
			</span>
		</div>

	</div>


</template><script>

	import menu_vue   from './menu.vue'
	import dialog_vue from './dialog.vue'

	export default {

		name: 'wrapper-',

		data(){ return { gs: gs.get }; },

		components: {
			'MenuComp':   menu_vue,
			'DialogComp': dialog_vue
		}

	}

</script>