'use strict';

var clsx = require('clsx');
var CloseButton = require('../common/closeButton/CloseButton.js');
var FlowHeader = require('../common/flowHeader/FlowHeader.js');
var Logo = require('../logo/Logo.js');
var jsxRuntime = require('react/jsx-runtime');
var size = require('../common/propsValues/size.js');

const defaultLogo = /*#__PURE__*/jsxRuntime.jsx(Logo.default, {});
function OverlayHeader({
  avatar,
  onClose,
  logo = defaultLogo
}) {
  const closeButton = onClose && /*#__PURE__*/jsxRuntime.jsx(CloseButton.CloseButton, {
    size: size.Size.LARGE,
    onClick: onClose
  });
  return /*#__PURE__*/jsxRuntime.jsx("div", {
    className: "np-overlay-header d-flex justify-content-center",
    children: /*#__PURE__*/jsxRuntime.jsx(FlowHeader, {
      className: "np-overlay-header__content p-a-3",
      leftContent: logo,
      rightContent: /*#__PURE__*/jsxRuntime.jsxs("div", {
        className: clsx.clsx('d-flex', 'align-items-center', 'order-2'),
        children: [avatar, avatar && closeButton && /*#__PURE__*/jsxRuntime.jsx("span", {
          className: clsx.clsx('m-x-1')
        }), closeButton]
      })
    })
  });
}

module.exports = OverlayHeader;
//# sourceMappingURL=OverlayHeader.js.map
