(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", "../Button", "../utils/theme/getTheme", "./themes"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.InfoCardHeader = exports.CloseIconStyle = exports.ButtonsStyled = exports.MessageHolder = exports.StyledInfoCard = 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 Button_1 = (0, tslib_1.__importDefault)(require("../Button"));
    var getTheme_1 = require("../utils/theme/getTheme");
    var themes_2 = require("./themes");
    var COMPONENT_NAME = "infoCard";
    exports.StyledInfoCard = styled_components_1.default.div.attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            theme: props.theme,
            defaultTheme: themes_2.defaultThemeInfoCard,
            componentName: COMPONENT_NAME
        })
    }); })(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n  .textToggler {\n    ", "\n  }\n  padding: 4px 16px;\n  background-color: ", ";\n  position: relative;\n  border-radius: 16px;\n  width: ", ";\n"], ["\n  .textToggler {\n    ", "\n  }\n  padding: 4px 16px;\n  background-color: ", ";\n  position: relative;\n  border-radius: 16px;\n  width: ", ";\n"])), function (_a) {
        var showMessage = _a.showMessage;
        if (showMessage) {
            return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n          padding: 0;\n          span {\n            margin: 0;\n          }\n        "], ["\n          padding: 0;\n          span {\n            margin: 0;\n          }\n        "])));
        }
        else {
            return null;
        }
    }, function (_a) {
        var _b = _a.status, status = _b === void 0 ? "info" : _b, theme = _a.theme;
        return theme.components[COMPONENT_NAME]["background" + (status.charAt(0).toUpperCase() + status.slice(1))];
    }, function (_a) {
        var _b = _a.$width, $width = _b === void 0 ? "100%" : _b;
        return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n      ", "\n    "], ["\n      ", "\n    "])), $width);
    });
    exports.MessageHolder = styled_components_1.default.div.attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            theme: props.theme,
            defaultTheme: themes_2.defaultThemeInfoCard,
            componentName: COMPONENT_NAME
        })
    }); })(templateObject_5 || (templateObject_5 = (0, tslib_1.__makeTemplateObject)(["\n  word-break: break-word;\n  color: ", ";\n  ", "\n"], ["\n  word-break: break-word;\n  color: ", ";\n  ", "\n"])), function (_a) {
        var theme = _a.theme;
        return theme.components[COMPONENT_NAME].color;
    }, function (_a) {
        var showMessage = _a.showMessage, size = _a.size;
        return showMessage && (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = (0, tslib_1.__makeTemplateObject)(["\n      margin-top: ", ";\n    "], ["\n      margin-top: ", ";\n    "])), size === "m" ? "14px" : "22px");
    });
    exports.ButtonsStyled = (0, styled_components_1.default)(Button_1.default)(templateObject_10 || (templateObject_10 = (0, tslib_1.__makeTemplateObject)(["\n  padding: 0 8px;\n  ", "\n"], ["\n  padding: 0 8px;\n  ", "\n"])), function (_a) {
        var showMessage = _a.showMessage, sizeInfoCard = _a.sizeInfoCard;
        switch (sizeInfoCard) {
            case "l":
            default:
                if (showMessage) {
                    return (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = (0, tslib_1.__makeTemplateObject)(["\n            margin: 10px 0 12px 4px;\n          "], ["\n            margin: 10px 0 12px 4px;\n          "])));
                }
                else {
                    return (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = (0, tslib_1.__makeTemplateObject)(["\n            margin-top: 8px;\n            margin-bottom: 12px;\n          "], ["\n            margin-top: 8px;\n            margin-bottom: 12px;\n          "])));
                }
            case "m":
                if (showMessage) {
                    return (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = (0, tslib_1.__makeTemplateObject)(["\n            margin: 6px 0 12px 4px;\n          "], ["\n            margin: 6px 0 12px 4px;\n          "])));
                }
                else {
                    return (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = (0, tslib_1.__makeTemplateObject)(["\n            margin-bottom: 12px;\n          "], ["\n            margin-bottom: 12px;\n          "])));
                }
        }
    });
    exports.CloseIconStyle = (0, styled_components_1.default)(Button_1.default)(templateObject_11 || (templateObject_11 = (0, tslib_1.__makeTemplateObject)(["\n  padding: 0;\n"], ["\n  padding: 0;\n"])));
    exports.InfoCardHeader = styled_components_1.default.div(templateObject_12 || (templateObject_12 = (0, tslib_1.__makeTemplateObject)(["\n  display: flex;\n  padding: 0 6px;\n  justify-content: space-between;\n  margin-top: 12px;\n"], ["\n  display: flex;\n  padding: 0 6px;\n  justify-content: space-between;\n  margin-top: 12px;\n"])));
    exports.StyledInfoCard.defaultProps = {
        theme: themes_1.LIGHT_THEME
    };
    exports.MessageHolder.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, templateObject_12;
});
