'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var clsx = require('clsx');
var reactIntl = require('react-intl');
require('../../common/theme.js');
require('../../common/direction.js');
require('@transferwise/neptune-tokens');
require('../../common/propsValues/control.js');
require('../../common/propsValues/size.js');
var typography = require('../../common/propsValues/typography.js');
require('../../common/propsValues/width.js');
require('../../common/propsValues/type.js');
require('../../common/propsValues/dateMode.js');
require('../../common/propsValues/monthFormat.js');
require('../../common/propsValues/position.js');
require('../../common/propsValues/layouts.js');
require('../../common/propsValues/status.js');
require('../../common/propsValues/sentiment.js');
require('../../common/propsValues/profileType.js');
require('../../common/propsValues/variant.js');
require('../../common/propsValues/scroll.js');
require('../../common/propsValues/markdownNodeType.js');
require('../../common/fileType.js');
require('@transferwise/formatting');
var icons = require('@transferwise/icons');
require('react');
require('../../common/closeButton/CloseButton.messages.js');
var jsxRuntime = require('react/jsx-runtime');
require('@transferwise/neptune-validation');
require('../../provider/direction/DirectionProvider.js');
var useLayout = require('../../common/hooks/useLayout/useLayout.js');
var Title = require('../../title/Title.js');
var Calendar_messages = require('../Calendar.messages.js');
var Button = require('../../button/Button.js');
var IconButton = require('../../iconButton/IconButton.js');

const DateHeader = ({
  label,
  onLabelClick,
  onPreviousClick,
  onNextClick,
  dateMode
}) => {
  const intl = reactIntl.useIntl();
  const {
    isMobile
  } = useLayout.useLayout();
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
    className: clsx.clsx('text-xs-center', !isMobile && ['clearfix', 'p-y-1']),
    children: [/*#__PURE__*/jsxRuntime.jsx("div", {
      className: "pull-left-single-direction",
      children: /*#__PURE__*/jsxRuntime.jsx(IconButton.default, {
        size: 40,
        priority: "minimal",
        className: "d-inline-flex",
        "aria-label": `${intl.formatMessage(Calendar_messages.default.previous)} ${dateMode}`,
        onClick: onPreviousClick,
        children: /*#__PURE__*/jsxRuntime.jsx(icons.ChevronLeft, {
          className: "left-single-direction"
        })
      })
    }), label && /*#__PURE__*/jsxRuntime.jsx(Title.default, {
      type: typography.Typography.TITLE_BODY,
      className: "tw-date-lookup-header-current-container",
      children: /*#__PURE__*/jsxRuntime.jsx(Button.default, {
        v2: true,
        size: "md",
        type: "button",
        priority: "tertiary",
        className: "tw-date-lookup-header-current",
        "aria-label": intl.formatMessage(Calendar_messages.default.goTo20YearView),
        addonEnd: {
          type: 'icon',
          value: /*#__PURE__*/jsxRuntime.jsx(icons.ChevronDown, {})
        },
        onClick: onLabelClick,
        children: label
      })
    }), /*#__PURE__*/jsxRuntime.jsx("div", {
      className: "pull-right-single-direction",
      children: /*#__PURE__*/jsxRuntime.jsx(IconButton.default, {
        size: 40,
        className: "d-inline-flex",
        "aria-label": `${intl.formatMessage(Calendar_messages.default.next)} ${dateMode}`,
        priority: "minimal",
        onClick: onNextClick,
        children: /*#__PURE__*/jsxRuntime.jsx(icons.ChevronRight, {
          className: "right-single-direction"
        })
      })
    })]
  });
};

exports.default = DateHeader;
//# sourceMappingURL=DateHeader.js.map
