import { __makeTemplateObject } from "tslib";
import styled, { css } from "styled-components";
import { LIGHT_THEME } from "../Pallette/themes";
import { getTheme } from "../utils/theme/getTheme";
import { Shape } from "../Pallette/Shape";
import { defaultThemeStatus } from "./themes";
var COMPONENT_NAME = "status";
export var StatusStyled = styled.div.attrs(function (props) { return ({
    theme: getTheme({
        theme: props.theme,
        defaultTheme: defaultThemeStatus,
        componentName: COMPONENT_NAME
    })
}); })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n  ", ";\n\n  ", ";\n\n  ", ";\n\n  display: flex;\n  position: relative;\n  align-items: center;\n  width: max-content;\n  border-radius: ", ";\n  font-size: 16px;\n  gap: 13px;\n  padding: 4px 12px 4px 12px;\n  height: 28px;\n\n  .status__icon {\n    color: unset;\n  }\n"], ["\n  ", ";\n\n  ", ";\n\n  ", ";\n\n  display: flex;\n  position: relative;\n  align-items: center;\n  width: max-content;\n  border-radius: ", ";\n  font-size: 16px;\n  gap: 13px;\n  padding: 4px 12px 4px 12px;\n  height: 28px;\n\n  .status__icon {\n    color: unset;\n  }\n"])), function (_a) {
    var theme = _a.theme, status = _a.status, isFilled = _a.isFilled;
    return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n      color: ", ";\n    "], ["\n      color: ", ";\n    "])), isFilled
        ? theme.components[COMPONENT_NAME]["color" + (status.charAt(0).toUpperCase() + status.slice(1)) + "Filled"]
        : theme.components[COMPONENT_NAME]["color" + (status.charAt(0).toUpperCase() + status.slice(1))]);
}, function (_a) {
    var theme = _a.theme, status = _a.status, isFilled = _a.isFilled;
    return !isFilled && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n      border: 1px solid\n        ", ";\n    "], ["\n      border: 1px solid\n        ", ";\n    "])), theme.components[COMPONENT_NAME]["borderColor" + (status.charAt(0).toUpperCase() + status.slice(1))]);
}, function (_a) {
    var isFilled = _a.isFilled, theme = _a.theme, status = _a.status;
    return isFilled && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n      background-color: ", ";\n      border: none;\n    "], ["\n      background-color: ", ";\n      border: none;\n    "])), theme.components[COMPONENT_NAME]["background" + (status.charAt(0).toUpperCase() + status.slice(1))]);
}, Shape.borderRadiusDefault);
StatusStyled.defaultProps = {
    theme: LIGHT_THEME
};
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
