<template>

	<div class='container'>

		<div class='header'>
			<div class='title'>{{ gs.room.get('text') ? gs.room.get('text').name : '?' }}</div>
		</div>

		<div class='body'>

			<section class='message-stack'>

				<div class='message' v-for='m in gs.content.messages'>
					<div class='icon' :style='`background-image: url("https://picsum.photos/150/?random&nonce=${m.uid}");`'></div>
					<span class='meta'>
						<span class='author'>{{ gs.content.user(m.uid).username || `guest ${m.uid}` }}</span>
						<span class='date'  >{{ m.ts || 'inconnu' }}</span>
					</span>
					<span class='text'>{{ m.msg }}</span>
				</div>

			</section>

			<section class='message-input'>
				<textarea :placeholder='`Message #${gs.room.get(`text`).name}`' @keydown='gs.content.auto_grow'></textarea>
			</section>

		</div>

	</div>

</template><script>
export default {

	name: 'channel-',

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

}

</script>