import { __makeTemplateObject } from "tslib";
import styled, { css } from "styled-components";
import { getTheme } from "../utils/theme/getTheme";
import { Padding } from "../Pallette/style-utils";
import { Shape } from "../Pallette/Shape";
import P2 from "../typography/P2";
import { LIGHT_THEME } from "../Pallette/themes";
import { defaultThemeList } from "./theme";
var COMPONENT_NAME = "list";
export var ListBaseItemStyled = styled(P2).attrs(function (props) { return ({
    theme: getTheme({
        componentName: COMPONENT_NAME,
        theme: props.theme,
        defaultTheme: defaultThemeList
    })
}); })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n  display: flex;\n  align-items: center;\n  box-sizing: border-box;\n  word-break: break-word;\n  border-radius: ", ";\n  cursor: ", ";\n\n  ", "\n\n  p, h6 {\n    ", "\n  }\n\n  ", ";\n"], ["\n  display: flex;\n  align-items: center;\n  box-sizing: border-box;\n  word-break: break-word;\n  border-radius: ", ";\n  cursor: ", ";\n\n  ", "\n\n  p, h6 {\n    ", "\n  }\n\n  ", ";\n"])), Shape.borderRadiusMedium, function (_a) {
    var isDisabled = _a.isDisabled;
    return (isDisabled ? "not-allowed" : "pointer");
}, function (_a) {
    var size = _a.size;
    if (size === "m") {
        return Padding.allSide(2, 4);
    }
    if (size === "s") {
        return Padding.allSide(0, 4);
    }
    return Padding.allSide(3, 4);
}, Padding.allSide(1), function (_a) {
    var theme = _a.theme, isSelected = _a.isSelected, isDisabled = _a.isDisabled, size = _a.size;
    if (size === "s") {
        if (isDisabled) {
            return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n          color: ", ";\n        "], ["\n          color: ", ";\n        "])), theme.components[COMPONENT_NAME].colorDisabled);
        }
        if (isSelected) {
            return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n          color: ", ";\n        "], ["\n          color: ", ";\n        "])), theme.components[COMPONENT_NAME].colorSelectedSizeS);
        }
        return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n        color: ", ";\n        &:hover {\n          color: ", ";\n        }\n      "], ["\n        color: ", ";\n        &:hover {\n          color: ", ";\n        }\n      "])), theme.components[COMPONENT_NAME].colorDefault, theme.components[COMPONENT_NAME].colorHover);
    }
    if (isDisabled) {
        return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n        background: ", ";\n        color: ", ";\n      "], ["\n        background: ", ";\n        color: ", ";\n      "])), theme.components[COMPONENT_NAME].backgroundDisabled, theme.components[COMPONENT_NAME].colorDisabled);
    }
    if (isSelected) {
        return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n        background: ", ";\n        color: ", ";\n      "], ["\n        background: ", ";\n        color: ", ";\n      "])), theme.components[COMPONENT_NAME].backgroundSelected, theme.components[COMPONENT_NAME].colorSelected);
    }
    return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n      background: ", ";\n      color: ", ";\n\n      &:hover {\n        svg {\n          color: ", ";\n        }\n        background: ", ";\n        color: ", ";\n      }\n    "], ["\n      background: ", ";\n      color: ", ";\n\n      &:hover {\n        svg {\n          color: ", ";\n        }\n        background: ", ";\n        color: ", ";\n      }\n    "])), theme.components[COMPONENT_NAME].backgroundDefault, theme.components[COMPONENT_NAME].colorDefault, theme.components[COMPONENT_NAME].colorHover, theme.components[COMPONENT_NAME].backgroundHover, theme.components[COMPONENT_NAME].colorHover);
});
ListBaseItemStyled.defaultProps = {
    theme: LIGHT_THEME
};
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
