(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", "../Pallette/themes", "../utils/theme/getTheme", "./themes"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.MapObjectRoot = exports.StripeStyled = void 0;
    var tslib_1 = require("tslib");
    var styled_components_1 = (0, tslib_1.__importStar)(require("styled-components"));
    var themes_1 = require("../Pallette/themes");
    var getTheme_1 = require("../utils/theme/getTheme");
    var themes_2 = require("./themes");
    exports.StripeStyled = styled_components_1.default.div(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n  position: absolute;\n  border-radius: 2px;\n  width: 12px;\n  transition: all 0.3s;\n  ", "\n\n  bottom: 8px;\n"], ["\n  position: absolute;\n  border-radius: 2px;\n  width: 12px;\n  transition: all 0.3s;\n  ", "\n\n  bottom: 8px;\n"])), function (_a) {
        var isChecked = _a.isChecked;
        if (isChecked) {
            return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n        height: 2px;\n      "], ["\n        height: 2px;\n      "])));
        }
        else {
            return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n        height: 0;\n      "], ["\n        height: 0;\n      "])));
        }
    });
    var COMPONENT_NAME = "mapObject";
    exports.MapObjectRoot = styled_components_1.default.div.attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            theme: props.theme,
            defaultTheme: themes_2.defaultThemeMapObject,
            componentName: COMPONENT_NAME
        }),
        typeColor: props.typeColor.charAt(0).toUpperCase() + props.typeColor.slice(1)
    }); })(templateObject_7 || (templateObject_7 = (0, tslib_1.__makeTemplateObject)(["\n  position: relative;\n  border-radius: 8px 8px 8px 0;\n  transition: all 0.4s;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  height: 40px;\n  width: 40px;\n  flex-direction: column;\n  border: none;\n  cursor: pointer;\n  padding: 8px;\n\n  background: ", ";\n  ", ";\n\n  ", "\n"], ["\n  position: relative;\n  border-radius: 8px 8px 8px 0;\n  transition: all 0.4s;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  height: 40px;\n  width: 40px;\n  flex-direction: column;\n  border: none;\n  cursor: pointer;\n  padding: 8px;\n\n  background: ", ";\n  ", ";\n\n  ", "\n"])), function (_a) {
        var theme = _a.theme, typeColor = _a.typeColor, isDisabled = _a.isDisabled, isChecked = _a.isChecked;
        if (isDisabled) {
            return theme.components[COMPONENT_NAME].backgroundDisabled;
        }
        else if (isChecked) {
            return theme.components[COMPONENT_NAME]["background" + typeColor + "Selected"];
        }
        else {
            return theme.components[COMPONENT_NAME]["background" + typeColor];
        }
    }, function (_a) {
        var theme = _a.theme, typeColor = _a.typeColor, isDisabled = _a.isDisabled;
        return (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = (0, tslib_1.__makeTemplateObject)(["\n    & ", " {\n      background: ", ";\n    }\n    & svg {\n      color: ", ";\n    }\n\n    &:hover {\n      background: ", ";\n\n      ", "\n    }\n  "], ["\n    & ", " {\n      background: ", ";\n    }\n    & svg {\n      color: ", ";\n    }\n\n    &:hover {\n      background: ", ";\n\n      ", "\n    }\n  "])), exports.StripeStyled, theme.components[COMPONENT_NAME].iconColor, isDisabled
            ? theme.components[COMPONENT_NAME].iconColorDisabled
            : theme.components[COMPONENT_NAME].iconColor, !isDisabled &&
            theme.components[COMPONENT_NAME]["background" + typeColor + "Hover"], isDisabled && (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = (0, tslib_1.__makeTemplateObject)(["\n        pointer-events: none;\n      "], ["\n        pointer-events: none;\n      "]))));
    }, function (_a) {
        var isChecked = _a.isChecked;
        return isChecked && (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = (0, tslib_1.__makeTemplateObject)(["\n      height: 42px;\n    "], ["\n      height: 42px;\n    "])));
    });
    exports.MapObjectRoot.defaultProps = {
        theme: themes_1.LIGHT_THEME
    };
    var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
});
