import { View } from 'react-native';
import BackButton from '../../../../../elements/BackButton';
import { Typography } from '../../../../../../core/components/Typography/Typography';
import { useTopBar } from './hooks/useTopBar';
import { Menu } from '../../elements';
export function TopBar({
  userId,
  displayName,
  inline,
  isShownDisplayName
}) {
  const {
    styles,
    handleGoBack,
    backButtonId
  } = useTopBar({
    inline
  });
  return /*#__PURE__*/React.createElement(View, {
    style: styles.container
  }, /*#__PURE__*/React.createElement(BackButton, {
    testID: backButtonId,
    onPress: handleGoBack
  }), isShownDisplayName && /*#__PURE__*/React.createElement(Typography.TitleBold, {
    numberOfLines: 1,
    ellipsizeMode: "tail",
    style: styles.displayName
  }, displayName), /*#__PURE__*/React.createElement(Menu, {
    userId: userId,
    displayName: displayName
  }));
}
//# sourceMappingURL=TopBar.js.map