import { __makeTemplateObject } from "tslib";
import styled, { css } from "styled-components";
import { getTheme } from "../utils/theme/getTheme";
import { LIGHT_THEME } from "../Pallette/themes";
import { defaultThemeDateBox } from "./theme";
var COMPONENT_NAME = "dateBox";
export var DateBoxWrapper = styled.button.attrs(function (props) { return ({
    theme: getTheme({
        theme: props.theme,
        componentName: COMPONENT_NAME,
        defaultTheme: defaultThemeDateBox
    })
}); })(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: center;\n  border: 0;\n  font-feature-settings: \"pnum\" on, \"lnum\" on;\n  cursor: pointer;\n  border-radius: 8px;\n\n  ", "\n\n  ", "  \n  ", "\n"], ["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: center;\n  border: 0;\n  font-feature-settings: \"pnum\" on, \"lnum\" on;\n  cursor: pointer;\n  border-radius: 8px;\n\n  ", "\n\n  ", "  \n  ", "\n"])), function (_a) {
    var size = _a.size;
    if (size === "m") {
        return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n        width: 24px;\n        height: 24px;\n      "], ["\n        width: 24px;\n        height: 24px;\n      "])));
    }
    return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n      width: 32px;\n      height: 32px;\n    "], ["\n      width: 32px;\n      height: 32px;\n    "])));
}, function (_a) {
    var viewType = _a.viewType, theme = _a.theme;
    switch (viewType) {
        case "current":
            return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n          background: ", ";\n          color: ", ";\n        "], ["\n          background: ", ";\n          color: ", ";\n        "])), theme.components.dateBox.backgroundCurrent, theme.components.dateBox.colorCurrent);
        case "selected":
            return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n          background: ", ";\n          color: ", ";\n        "], ["\n          background: ", ";\n          color: ", ";\n        "])), theme.components.dateBox.backgroundActive, theme.components.dateBox.colorActive);
        case "start":
            return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n          padding-left: 2px;\n          background: linear-gradient(\n            to right,\n            ", " 87.5%,\n            ", " 0%\n          );\n          color: ", ";\n        "], ["\n          padding-left: 2px;\n          background: linear-gradient(\n            to right,\n            ", " 87.5%,\n            ", " 0%\n          );\n          color: ", ";\n        "])), theme.components.dateBox.backgroundActive, theme.components.dateBox.backgroundIn, theme.components.dateBox.colorActive);
        case "in":
            return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n          background: ", ";\n          color: ", ";\n        "], ["\n          background: ", ";\n          color: ", ";\n        "])), theme.components.dateBox.backgroundIn, theme.components.dateBox.colorIn);
        case "finish":
            return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n          padding-right: 2px;\n          background: linear-gradient(\n            to right,\n            ", " 12.5%,\n            ", " 0%\n          );\n          color: ", ";\n        "], ["\n          padding-right: 2px;\n          background: linear-gradient(\n            to right,\n            ", " 12.5%,\n            ", " 0%\n          );\n          color: ", ";\n        "])), theme.components.dateBox.backgroundIn, theme.components.dateBox.backgroundActive, theme.components.dateBox.colorActive);
        case "weekend":
            return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n          background: ", ";\n          color: ", ";\n        "], ["\n          background: ", ";\n          color: ", ";\n        "])), theme.components.dateBox.backgroundDefault, theme.components.dateBox.colorWeekend);
        default:
            return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n          color: ", ";\n          background: ", ";\n          &:hover {\n            background: ", ";\n            color: ", ";\n          }\n        "], ["\n          color: ", ";\n          background: ", ";\n          &:hover {\n            background: ", ";\n            color: ", ";\n          }\n        "])), theme.components.dateBox.colorDefault, theme.components.dateBox.backgroundDefault, theme.components.dateBox.backgroundHover, theme.components.dateBox.colorHover);
    }
}, function (_a) {
    var theme = _a.theme;
    return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n    &:disabled {\n      background: ", ";\n      color: ", ";\n      cursor: not-allowed;\n    }\n  "], ["\n    &:disabled {\n      background: ", ";\n      color: ", ";\n      cursor: not-allowed;\n    }\n  "])), theme.components.dateBox.backgroundDisabled, theme.components.dateBox.colorDisabled);
});
DateBoxWrapper.defaultProps = {
    theme: LIGHT_THEME
};
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
