/**
* @external MenuDefinition
*/
import { menuTemplate } from './Menu.stories.data';
import userLinksTemplateLegacy from '!!raw-loader!../includes/templates/legacy/UserLinks.mustache';
import userLinksTemplate from '!!raw-loader!../includes/templates/UserLinks.mustache';
import { helperMakeMenuData } from './utils';
/**
* @type {MenuDefinition}
*/
const loggedOut = helperMakeMenuData(
'personal',
`
Not logged inTalkContributionsCreate accountLog in`,
'vector-user-menu-legacy'
);
const ECHO_ITEMS = `Alerts (0)Notices (3)`;
const USERNAME_ITEM = `WikiUser`;
const REST_ITEMS = `TalkSandboxPreferencesBetaWatchlistContributions`;
const LOGOUT_ITEM = `Log out`;
const ULS_LANGUAGE_SELECTOR = 'English';
/**
* @type {MenuDefinition}
*/
const loggedInWithEcho = helperMakeMenuData(
'personal',
`${USERNAME_ITEM}${ECHO_ITEMS}${REST_ITEMS}${LOGOUT_ITEM}`,
'vector-user-menu-legacy'
);
/**
* @type {MenuDefinition}
*/
const loggedInWithULS = helperMakeMenuData(
'personal',
`${ULS_LANGUAGE_SELECTOR}${USERNAME_ITEM}${ECHO_ITEMS}${REST_ITEMS}${LOGOUT_ITEM}`,
'vector-user-menu-legacy'
);
/**
* @type {Object.}
*/
const PERSONAL_MENU_TEMPLATE_DATA = {
loggedOut,
loggedInWithEcho,
loggedInWithULS
};
/**
* @type {Object.}
*/
const USER_LINKS_LOGGED_IN_TEMPLATE_DATA = {
'data-user-page': helperMakeMenuData( 'user-page', USERNAME_ITEM ),
'data-notifications': helperMakeMenuData( 'notifications', ECHO_ITEMS ),
'data-user-menu': helperMakeMenuData( 'personal', REST_ITEMS )
};
export { PERSONAL_MENU_TEMPLATE_DATA,
USER_LINKS_LOGGED_IN_TEMPLATE_DATA,
menuTemplate, userLinksTemplateLegacy, userLinksTemplate };