import { __makeTemplateObject } from "tslib";
import styled, { css } from "styled-components";
import { LIGHT_THEME } from "../Pallette/themes";
import Button from "../Button";
import { getTheme } from "../utils/theme/getTheme";
import { defaultThemeInfoCard } from "./themes";
var COMPONENT_NAME = "infoCard";
export var StyledInfoCard = styled.div.attrs(function (props) { return ({
    theme: getTheme({
        theme: props.theme,
        defaultTheme: defaultThemeInfoCard,
        componentName: COMPONENT_NAME
    })
}); })(templateObject_3 || (templateObject_3 = __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 css(templateObject_1 || (templateObject_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 css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n      ", "\n    "], ["\n      ", "\n    "])), $width);
});
export var MessageHolder = styled.div.attrs(function (props) { return ({
    theme: getTheme({
        theme: props.theme,
        defaultTheme: defaultThemeInfoCard,
        componentName: COMPONENT_NAME
    })
}); })(templateObject_5 || (templateObject_5 = __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 && css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n      margin-top: ", ";\n    "], ["\n      margin-top: ", ";\n    "])), size === "m" ? "14px" : "22px");
});
export var ButtonsStyled = styled(Button)(templateObject_10 || (templateObject_10 = __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 css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n            margin: 10px 0 12px 4px;\n          "], ["\n            margin: 10px 0 12px 4px;\n          "])));
            }
            else {
                return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n            margin-top: 8px;\n            margin-bottom: 12px;\n          "], ["\n            margin-top: 8px;\n            margin-bottom: 12px;\n          "])));
            }
        case "m":
            if (showMessage) {
                return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n            margin: 6px 0 12px 4px;\n          "], ["\n            margin: 6px 0 12px 4px;\n          "])));
            }
            else {
                return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n            margin-bottom: 12px;\n          "], ["\n            margin-bottom: 12px;\n          "])));
            }
    }
});
export var CloseIconStyle = styled(Button)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n  padding: 0;\n"], ["\n  padding: 0;\n"])));
export var InfoCardHeader = styled.div(templateObject_12 || (templateObject_12 = __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"])));
StyledInfoCard.defaultProps = {
    theme: LIGHT_THEME
};
MessageHolder.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, templateObject_12;
