"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.CustomDayPicker = CustomDayPicker;
exports.default = void 0;
exports.formatMonthCaption = formatMonthCaption;
var _CustomDayPickerCaption = _interopRequireDefault(require("./CustomDayPickerCaption"));
var _dateFns = require("date-fns");
var _reactDayPicker = require("react-day-picker");
var _Icons = require("../Icons");
var _i18n = require("../i18n");
var _CustomDayPickerDayContent = require("./CustomDayPickerDayContent");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
 * The default formatter for the Month caption.
 */
function formatMonthCaption(month, options) {
  return (0, _dateFns.format)(month, 'LLL', options);
}
function CustomDayPicker(props) {
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactDayPicker.DayPicker, {
    mode: "single",
    footer: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
      className: "ds-u-visibility--screen-reader",
      children: (0, _i18n.t)('singleInputDateField.arrowKeyInstructions')
    }),
    captionLayout: "dropdown",
    components: {
      Caption: _CustomDayPickerCaption.default,
      IconDropdown: _Icons.ArrowsStackedIcon,
      DayContent: _CustomDayPickerDayContent.CustomDayPickerDayContent
    },
    formatters: {
      formatMonthCaption
    },
    ...props
  });
}
var _default = exports.default = CustomDayPicker;