"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;exports.getFontSize = getFontSize;exports.styles = void 0;var _taggedTemplateLiteralLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));
var _Emotion = require("../../lib/theming/Emotion");

var _Calendar = require("../Calendar");var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;

var styles = exports.styles = (0, _Emotion.memoizeStyle)({
  root: function root(t) {
    return (0, _Emotion.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2.default)(["\n      display: inline-flex;\n      align-items: center;\n      color: ", ";\n\n      & > * {\n        flex: 1 1 50%;\n      }\n    "])),


    t.textColorDefault);





  },
  inputWrapperWidth: function inputWrapperWidth(t) {
    return (0, _Emotion.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2.default)(["\n      min-width: ", "px;\n    "])),
    parseInt(t.calendarCellWidth) * 7 + parseInt(t.calendarPaddingX) * 2);

  },
  inputWrapperWidthFull: function inputWrapperWidthFull() {
    return (0, _Emotion.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteralLoose2.default)(["\n      width: 100%;\n    "])));


  },
  inputVisuallyFocus: function inputVisuallyFocus(t) {
    return (0, _Emotion.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteralLoose2.default)(["\n      box-shadow: ", ";\n    "])),
    t.inputFocusShadow);

  },
  calendarWrapper: function calendarWrapper(t) {
    return (0, _Emotion.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteralLoose2.default)(["\n      box-shadow: ", ";\n      display: inline-block;\n      font-size: 0;\n      z-index: 1000;\n      touch-action: none;\n    "])),
    t.pickerShadow);





  },
  calendarWidthAuto: function calendarWidthAuto() {
    return (0, _Emotion.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteralLoose2.default)(["\n      width: auto;\n    "])));


  },
  rangeCalendarDay: function rangeCalendarDay() {
    return (0, _Emotion.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteralLoose2.default)(["\n      width: 100%;\n      height: 100%;\n    "])));



  },
  rangeCalendarDayEnd: function rangeCalendarDayEnd(t) {
    return (0, _Emotion.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteralLoose2.default)(["\n      position: relative;\n\n      &:before {\n        content: '';\n        position: absolute;\n        top: 0;\n        left: 0;\n        width: 100%;\n        height: 100%;\n        background: ", ";\n        border-radius: ", ";\n      }\n\n      [data-tid=", "] {\n        color: ", ";\n\n        @media (hover: hover) {\n          &:hover {\n            color: ", ";\n            background: none;\n          }\n        }\n      }\n    "])),









    t.rangeCalendarCellEndBg,
    t.calendarCellBorderRadius,


    _Calendar.CalendarDataTids.dayCell,
    t.rangeCalendarCellEndColor,



    t.rangeCalendarCellEndColor);





  },
  rangeCalendarDayInHoveredPeriod: function rangeCalendarDayInHoveredPeriod(t) {
    return (0, _Emotion.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteralLoose2.default)(["\n      background: ", ";\n    "])),
    t.rangeCalendarCellBg);

  },
  rangeCalendarDayHoverInPeriod: function rangeCalendarDayHoverInPeriod(t) {
    return (0, _Emotion.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteralLoose2.default)(["\n      @media (hover: hover) {\n        &:hover [data-tid=", "] {\n          background: ", ";\n        }\n      }\n    "])),

    _Calendar.CalendarDataTids.dayCell,
    t.rangeCalendarCellHoverBg);



  },
  buttonWrap: function buttonWrap() {
    return (0, _Emotion.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteralLoose2.default)(["\n      display: flex;\n      margin: 8px;\n\n      > * {\n        flex-grow: 1;\n      }\n\n      > *:not(:first-child) {\n        margin-left: 8px;\n      }\n    "])));











  }
});

function getFontSize(t, size) {
  switch (size) {
    case 'large':
      return t.fontSizeLarge;
    case 'medium':
      return t.fontSizeMedium;
    case 'small':
    default:
      return t.fontSizeSmall;
  }
}