text: 'use strict'
  
  exports.__esModule = true
  exports.default = _default
  exports.formats = void 0
  
  var _localizer = require('../localizer')
  
  var dateRangeFormat = function dateRangeFormat(_ref, culture, local) {
    var start = _ref.start,
      end = _ref.end
    return (
      local.format(start, 'd', culture) + ' – ' + local.format(end, 'd', culture)
    )
  }
  
  var timeRangeFormat = function timeRangeFormat(_ref2, culture, local) {
    var start = _ref2.start,
      end = _ref2.end
    return (
      local.format(start, 't', culture) + ' – ' + local.format(end, 't', culture)
    )
  }
  
  var timeRangeStartFormat = function timeRangeStartFormat(
    _ref3,
    culture,
    local
  ) {
    var start = _ref3.start
    return local.format(start, 't', culture) + ' – '
  }
  
  var timeRangeEndFormat = function timeRangeEndFormat(_ref4, culture, local) {
    var end = _ref4.end
    return ' – ' + local.format(end, 't', culture)
  }
  
  var weekRangeFormat = function weekRangeFormat(_ref5, culture, local) {
    var start = _ref5.start,
      end = _ref5.end
    return (
      local.format(start, 'MMM dd', culture) +
      ' – ' +
      local.format(end, 'MMM dd', culture)
    )
  }
  
  var formats = {
    dateFormat: 'dd',
    dayFormat: 'ddd dd/MM',
    weekdayFormat: 'ddd',
    selectRangeFormat: timeRangeFormat,
    eventTimeRangeFormat: timeRangeFormat,
    eventTimeRangeStartFormat: timeRangeStartFormat,
    eventTimeRangeEndFormat: timeRangeEndFormat,
    timeGutterFormat: 't',
    monthHeaderFormat: 'Y',
    dayHeaderFormat: 'dddd MMM dd',
    dayRangeHeaderFormat: weekRangeFormat,
    agendaHeaderFormat: dateRangeFormat,
    agendaDateFormat: 'ddd MMM dd',
    agendaTimeFormat: 't',
    agendaTimeRangeFormat: timeRangeFormat,
  }
  exports.formats = formats
  
  function _default(globalize) {
    function getCulture(culture) {
      return culture ? globalize.findClosestCulture(culture) : globalize.culture()
    }
  
    function firstOfWeek(culture) {
      culture = getCulture(culture)
      return (culture && culture.calendar.firstDay) || 0
    }
  
    return new _localizer.DateLocalizer({
      firstOfWeek: firstOfWeek,
      formats: formats,
      format: function format(value, _format, culture) {
        return globalize.format(value, _format, culture)
      },
    })
  }
  