(() => {

	const userMenu = document.querySelector('wa-menu#user-menu')
	userMenu.addEventListener('wa-select', event => {
		console.log('user menu click', event)

		const item = event.detail.item.value
		if ( item === 'old' ) {
			window.location.href = '/dash'
		} else if ( item === 'home' ) {
			window.location.href = '/'
		} else if ( item === 'logout' ) {
			window.location.href = '/auth/coreid/logout'
		}
	})

})();
