(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "tslib", "styled-components", "../utils/theme/getTheme", "../Pallette/themes", "./theme"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.DateBoxWrapper = void 0;
    var tslib_1 = require("tslib");
    var styled_components_1 = (0, tslib_1.__importStar)(require("styled-components"));
    var getTheme_1 = require("../utils/theme/getTheme");
    var themes_1 = require("../Pallette/themes");
    var theme_1 = require("./theme");
    var COMPONENT_NAME = "dateBox";
    exports.DateBoxWrapper = styled_components_1.default.button.attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            theme: props.theme,
            componentName: COMPONENT_NAME,
            defaultTheme: theme_1.defaultThemeDateBox
        })
    }); })(templateObject_11 || (templateObject_11 = (0, tslib_1.__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 (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n        width: 24px;\n        height: 24px;\n      "], ["\n        width: 24px;\n        height: 24px;\n      "])));
        }
        return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = (0, tslib_1.__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 (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n          background: ", ";\n          color: ", ";\n        "], ["\n          background: ", ";\n          color: ", ";\n        "])), theme.components.dateBox.backgroundCurrent, theme.components.dateBox.colorCurrent);
            case "selected":
                return (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = (0, tslib_1.__makeTemplateObject)(["\n          background: ", ";\n          color: ", ";\n        "], ["\n          background: ", ";\n          color: ", ";\n        "])), theme.components.dateBox.backgroundActive, theme.components.dateBox.colorActive);
            case "start":
                return (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = (0, tslib_1.__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 (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = (0, tslib_1.__makeTemplateObject)(["\n          background: ", ";\n          color: ", ";\n        "], ["\n          background: ", ";\n          color: ", ";\n        "])), theme.components.dateBox.backgroundIn, theme.components.dateBox.colorIn);
            case "finish":
                return (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = (0, tslib_1.__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 (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = (0, tslib_1.__makeTemplateObject)(["\n          background: ", ";\n          color: ", ";\n        "], ["\n          background: ", ";\n          color: ", ";\n        "])), theme.components.dateBox.backgroundDefault, theme.components.dateBox.colorWeekend);
            default:
                return (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = (0, tslib_1.__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 (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = (0, tslib_1.__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);
    });
    exports.DateBoxWrapper.defaultProps = {
        theme: themes_1.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;
});
