import './RangeDatePopover.styles_1gz2vm.css';
import { styled } from '@linaria/react';
import { privateTokens, tokens } from '../../DatePicker.tokens.js';
import { withRange } from '../../../Calendar/hoc/withRange.js';
import { component, mergeConfig } from '../../../../engines/common.js';
import { calendarDoubleConfig } from '../../../Calendar/CalendarDouble/CalendarDouble.js';
import { calendarBaseConfig } from '../../../Calendar/CalendarBase/CalendarBase.js';

var mergedCalendarDoubleConfig = /*#__PURE__*/mergeConfig(calendarDoubleConfig);
var CalendarDouble = /*#__PURE__*/component(mergedCalendarDoubleConfig);
var mergedCalendarConfig = /*#__PURE__*/mergeConfig(calendarBaseConfig);
var Calendar = /*#__PURE__*/component(mergedCalendarConfig);
var CalendarDoubleRange = /*#__PURE__*/withRange(CalendarDouble);
var CalendarRange = /*#__PURE__*/withRange(Calendar);

// NOTE: переопределение токенов Calendar
var _exp = function _exp() {
  return CalendarDoubleRange;
};
var _exp4 = function _exp4() {
  return function (_ref) {
    var innerWidth = _ref.innerWidth;
    return innerWidth && innerWidth !== '0' ? '1' : '0';
  };
};
var _exp5 = function _exp5() {
  return function (_ref2) {
    var innerWidth = _ref2.innerWidth;
    return innerWidth && innerWidth !== '0' ? '100%' : "var(".concat(privateTokens.calendarDoubleWidth, ")");
  };
};
var _exp6 = function _exp6() {
  return function (_ref3) {
    var innerHeight = _ref3.innerHeight;
    return innerHeight && innerHeight !== '0' ? '100%' : "var(".concat(tokens.calendarHeight, ")");
  };
};
var StyledCalendarDouble = /*#__PURE__*/styled(_exp())({
  name: "StyledCalendarDouble",
  "class": "sf5aytd",
  propsAsIs: true,
  vars: {
    "sf5aytd-0": [/*#__PURE__*/_exp4()],
    "sf5aytd-1": [/*#__PURE__*/_exp5()],
    "sf5aytd-2": [/*#__PURE__*/_exp6()]
  }
});
var _exp0 = function _exp0() {
  return CalendarRange;
};
var _exp1 = function _exp1() {
  return function (_ref4) {
    var innerWidth = _ref4.innerWidth;
    return innerWidth && innerWidth !== '0' ? '1' : '0';
  };
};
var _exp10 = function _exp10() {
  return function (_ref5) {
    var innerWidth = _ref5.innerWidth;
    return innerWidth && innerWidth !== '0' ? '100%' : "var(".concat(tokens.calendarWidth, ")");
  };
};
var _exp11 = function _exp11() {
  return function (_ref6) {
    var innerHeight = _ref6.innerHeight;
    return innerHeight && innerHeight !== '0' ? '100%' : "var(".concat(tokens.calendarHeight, ")");
  };
};
var StyledCalendar = /*#__PURE__*/styled(_exp0())({
  name: "StyledCalendar",
  "class": "s1qixf8a",
  propsAsIs: true,
  vars: {
    "s1qixf8a-0": [/*#__PURE__*/_exp1()],
    "s1qixf8a-1": [/*#__PURE__*/_exp10()],
    "s1qixf8a-2": [/*#__PURE__*/_exp11()]
  }
});

export { StyledCalendar, StyledCalendarDouble };
