<style lang="scss">
#headerPopover .lpContent {
	min-width: 9em;
}
</style>

<template>
	<span class="headerItem hasPopover">
		<PopoverHover id="headerPopover">
			<span slot="target">More <i class="lpSprite lpExpand" /></span>
			<div slot="content">
				<a class="lpHref" @click="showChangePassword">Change password</a><br>
				<a class="lpHref" @click="showHelp">Help</a><br>
				<a class="lpHref" @click="logout">Logout</a>
			</div>
		</PopoverHover>
	</span>
</template>

<script>
import PopoverHover from './popoverHover.vue';

export default {
	name: 'MoreDropdown',
	components: {
		PopoverHover,
	},
	computed: {
		library() {
			return this.$store.state.library;
		},
	},
	methods: {
		showChangePassword() {
			bus.$emit('showChangePassword');
		},
		showHelp() {
			bus.$emit('showHelp');
		},
		logout() {
			this.$store.commit('logout');
			router.push('/login');
		},
	},
};
</script>
