'use strict';

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

var React = require('react');
require('focus-visible');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var React__default = /*#__PURE__*/_interopDefault(React);

/**
 * Компонент календаря с диапазоном.
 */
var boundCalendar = function boundCalendar(_ref) {
  var CalendarBase = _ref.base,
    CalendarDouble = _ref["double"],
    CalendarBaseRange = _ref.baseRange,
    CalendarDoubleRange = _ref.doubleRange;
  return function (rest) {
    if (!rest.isRange && !rest.isDouble) {
      return /*#__PURE__*/React__default.default.createElement(CalendarBase, rest);
    }
    if (!rest.isRange && rest.isDouble) {
      return /*#__PURE__*/React__default.default.createElement(CalendarDouble, rest);
    }
    if (rest.isRange && !rest.isDouble) {
      return /*#__PURE__*/React__default.default.createElement(CalendarBaseRange, rest);
    }
    if (rest.isRange && rest.isDouble) {
      return /*#__PURE__*/React__default.default.createElement(CalendarDoubleRange, rest);
    }
    return null;
  };
};

exports.boundCalendar = boundCalendar;
