import React from 'react';
import PropTypes from 'prop-types';
import { AccountInterface, Environment, HostsInterface, NavElement, Platform, URLS, UserMenuURLS } from '../../types';
export interface UserMenuProps {
/**
* Object that contains information about the active user.
* {firstName: 'string', lastName: 'string', email: 'string'}
*/
account?: AccountInterface;
/**
* Determines what nav item is currently active.
*/
activeNav?: NavElement;
/**
* Callback invoked after the user clicks log out.
*/
onLogout?: React.MouseEventHandler;
/**
* Callback invoked after the user clicks a product.
*/
onProductChange?: React.MouseEventHandler;
/**
* Object that supplies URL overrides to UserMenu component.
* Shape: { userMenu:{ cloud: { userPreferences, organizations, invitations, mfa }, university: { universityPreferences }, support: { userPreferences }, account: { homepage } }}
*/
urls?: URLS | {
userMenu: UserMenuURLS;
};
/**
* Object that supplies host overrides to UserMenu component.
* Shape: { cloud, realm, charts, account, university, support }
* Defaults to the production homepages of each product
*/
hosts?: HostsInterface;
/**
* MongoDB platform that is currently active.
*/
activePlatform?: Platform;
/**
* Describes the environment that the consumer is in: `commercial` or `government`
*/
environment?: Environment;
/**
* Whether the content has been loaded
*/
loading?: boolean;
}
/**
* # UserMenu
*
* UserMenu component
*
* ```
```
* @param props.account Object that contains information about the active user.
* {firstName: 'string', lastName: 'string', email: 'string'}
* @param props.activeNav Determines what nav item is currently active.
* @param props.onLogout Callback fired when a user logs out.
* @param props.onProductChange Callback invoked after the user clicks a product.
* @param props.hosts Object where keys are MDB products and values are the desired hostURL override for that product, to enable `` to work across all environments.
* @param props.urls Object to enable custom overrides for every `href` used in ``.
* @param props.activePlatform MongoDB platform that is currently active.
* @param props.environment Describes the environment that the consumer is in: `commercial` or `government`
*/
declare function UserMenu({ account, activeNav, activePlatform, onLogout: onLogoutProp, urls: urlsProp, hosts: hostsProp, onProductChange, environment, loading, }: UserMenuProps): JSX.Element;
declare namespace UserMenu {
var displayName: string;
var propTypes: {
user: PropTypes.Requireable<{
[x: string]: string | null | undefined;
}>;
activePlatform: PropTypes.Requireable;
onLogout: PropTypes.Requireable<(...args: any[]) => any>;
onProductChange: PropTypes.Requireable<(...args: any[]) => any>;
onAccountClick: PropTypes.Requireable<(...args: any[]) => any>;
};
}
export default UserMenu;
//# sourceMappingURL=UserMenu.d.ts.map