'use strict';

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

var styled = require('styled-components');
var index = require('../../../../utils/index.js');
var styles = require('../day/styles.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);

const CalendarWrapper = styled__default['default'].div `
  min-width: 312px;

  @media (max-width: 420px) {
    min-width: 0;
  }
`;
styled__default['default'].div `
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: ${index.getSpacing('s04', 's05')};
  font-weight: ${(props) => props.theme.font.weightExtrabold};
  ${index.getFontSize('size16')};
  color: ${index.getColorAlias('contentDefault')};
`;
styled__default['default'].div `
  display: flex;
`;
styled__default['default'].span `
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  ${index.getFontSize('size14')};
  font-weight: ${(props) => props.theme.font.weightRegular};
  color: ${index.getColorAlias('contentDisabled')};
  margin: ${index.getSpacing('s00', 's02')};
`;
function getNthChild(startColumn, isRight) {
    if (startColumn === 0) {
        if (isRight)
            return '7n';
        return '7n + 1';
    }
    if (isRight)
        return `7n - ${startColumn - 1}`;
    return `7n - ${startColumn - 2}`;
}
const Dates = styled__default['default'].div.withConfig({
    shouldForwardProp: index.convertToTransientProps(['startColumn']),
}) `
  padding: ${index.getSpacing('s00', 's04', 's04')};
  display: grid;
  grid-template-columns: repeat(7, 1fr);

  ${({ startColumn }) => styled.css `
      ${styles.Wrapper}:nth-child(${getNthChild(startColumn, true)}) {
        border-bottom-right-radius: 20px;
        border-top-right-radius: 20px;
      }
      ${styles.Wrapper}:nth-child(${getNthChild(startColumn, false)}) {
        border-bottom-left-radius: 20px;
        border-top-left-radius: 20px;
      }
      ${styles.Wrapper}:first-of-type {
        grid-column: ${startColumn};
        border-bottom-left-radius: 20px;
        border-top-left-radius: 20px;
      }
    `}
  ${styles.Wrapper}:last-child {
    border-bottom-right-radius: 20px;
    border-top-right-radius: 20px;
  }
`;
const NarrowMonth = styled__default['default'].div `
  padding: ${index.getSpacing('s04')};
  margin-left: ${index.getSpacing('s02')};
  font-weight: ${(props) => props.theme.font.weightExtrabold};
`;

exports.CalendarWrapper = CalendarWrapper;
exports.Dates = Dates;
exports.NarrowMonth = NarrowMonth;
