"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.TopBar = TopBar;
var _reactNative = require("react-native");
var _BackButton = _interopRequireDefault(require("../../../../../elements/BackButton"));
var _Typography = require("../../../../../../core/components/Typography/Typography");
var _useTopBar = require("./hooks/useTopBar");
var _elements = require("../../elements");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function TopBar({
  userId,
  displayName,
  inline,
  isShownDisplayName
}) {
  const {
    styles,
    handleGoBack,
    backButtonId
  } = (0, _useTopBar.useTopBar)({
    inline
  });
  return /*#__PURE__*/React.createElement(_reactNative.View, {
    style: styles.container
  }, /*#__PURE__*/React.createElement(_BackButton.default, {
    testID: backButtonId,
    onPress: handleGoBack
  }), isShownDisplayName && /*#__PURE__*/React.createElement(_Typography.Typography.TitleBold, {
    numberOfLines: 1,
    ellipsizeMode: "tail",
    style: styles.displayName
  }, displayName), /*#__PURE__*/React.createElement(_elements.Menu, {
    userId: userId,
    displayName: displayName
  }));
}
//# sourceMappingURL=TopBar.js.map