import { __makeTemplateObject } from "tslib";
import styled, { css } from "styled-components";
import { getTheme } from "../utils/theme/getTheme";
import { LIGHT_THEME } from "../Pallette/themes";
import { defaultThemeDivider } from "./theme";
var COMPONENT_NAME = "divider";
export var DividerComponent = styled.div.attrs(function (props) { return ({
    theme: getTheme({
        theme: props.theme,
        componentName: COMPONENT_NAME,
        defaultTheme: defaultThemeDivider
    })
}); })(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n  display: flex;\n  align-items: center;\n  ", "\n  ", "\n\n  & > * {\n    width: max-content;\n    color: ", ";\n  }\n\n  &::before,\n  &::after {\n    content: \"\";\n    background: ", ";\n  }\n\n  ", "\n\n  ", "\n"], ["\n  display: flex;\n  align-items: center;\n  ", "\n  ", "\n\n  & > * {\n    width: max-content;\n    color: ", ";\n  }\n\n  &::before,\n  &::after {\n    content: \"\";\n    background: ", ";\n  }\n\n  ", "\n\n  ", "\n"])), function (_a) {
    var direction = _a.direction, width = _a.width, height = _a.height;
    return direction === "row"
        ? css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n          width: ", ";\n          flex-direction: row;\n          gap: 8px;\n          &::before,\n          &::after {\n            height: 1px;\n          }\n        "], ["\n          width: ", ";\n          flex-direction: row;\n          gap: 8px;\n          &::before,\n          &::after {\n            height: 1px;\n          }\n        "])), width ? width : "100%") : css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n          height: ", ";\n          flex-direction: column;\n          gap: 2.4px;\n          &::before,\n          &::after {\n            width: 1px;\n          }\n        "], ["\n          height: ", ";\n          flex-direction: column;\n          gap: 2.4px;\n          &::before,\n          &::after {\n            width: 1px;\n          }\n        "])), height ? height : "100%");
}, function (_a) {
    var isHasChildren = _a.isHasChildren;
    return !isHasChildren && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n      gap: 0;\n    "], ["\n      gap: 0;\n    "])));
}, function (_a) {
    var theme = _a.theme;
    return theme.components.divider.colorContent;
}, function (_a) {
    var theme = _a.theme, status = _a.status;
    return theme.components.divider[status + "Background"];
}, function (_a) {
    var direction = _a.direction;
    if (direction === "row") {
        return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n        &::after {\n          border-radius: 0 4px 4px 0;\n        }\n        &::before {\n          border-radius: 4px 0 0 4px;\n        }\n      "], ["\n        &::after {\n          border-radius: 0 4px 4px 0;\n        }\n        &::before {\n          border-radius: 4px 0 0 4px;\n        }\n      "])));
    }
    return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n      &::after {\n        border-radius: 0 0 4px 4px;\n      }\n      &::before {\n        border-radius: 4px 4px 0 0;\n      }\n    "], ["\n      &::after {\n        border-radius: 0 0 4px 4px;\n      }\n      &::before {\n        border-radius: 4px 4px 0 0;\n      }\n    "])));
}, function (_a) {
    var align = _a.align, direction = _a.direction;
    switch (align) {
        case "left":
            return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n          &::before {\n            ", "\n          }\n          &::after {\n            flex-grow: 1;\n          }\n        "], ["\n          &::before {\n            ", "\n          }\n          &::after {\n            flex-grow: 1;\n          }\n        "])), direction === "row" ? "width: 8px;" : "height: 8px;");
        case "right":
            return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n          &::before {\n            flex-grow: 1;\n          }\n          &::after {\n            ", "\n          }\n        "], ["\n          &::before {\n            flex-grow: 1;\n          }\n          &::after {\n            ", "\n          }\n        "])), direction === "row" ? "width: 8px;" : "height: 8px;");
        default:
            return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n          &::before,\n          &::after {\n            flex-grow: 1;\n          }\n        "], ["\n          &::before,\n          &::after {\n            flex-grow: 1;\n          }\n        "])));
    }
});
DividerComponent.defaultProps = {
    theme: LIGHT_THEME
};
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
