(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/style-utils", "../../styles", "../../../Pallette/themes", "../../theme", "../../../utils/theme/getTheme"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.IconWrapper = exports.ListHeaderStyled = void 0;
    var tslib_1 = require("tslib");
    var styled_components_1 = (0, tslib_1.__importStar)(require("styled-components"));
    var style_utils_1 = require("../../../Pallette/style-utils");
    var styles_1 = require("../../styles");
    var themes_1 = require("../../../Pallette/themes");
    var theme_1 = require("../../theme");
    var getTheme_1 = require("../../../utils/theme/getTheme");
    var COMPONENT_NAME = "list";
    var rotateCollapseIcon = (0, styled_components_1.keyframes)(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n  from {\n    transform: rotate(0deg);\n  }\n  \n  to {\n    transform: rotate(180deg);\n  }\n"], ["\n  from {\n    transform: rotate(0deg);\n  }\n  \n  to {\n    transform: rotate(180deg);\n  }\n"])));
    var rotateRevertCollapseIcon = (0, styled_components_1.keyframes)(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n  from {\n    transform: rotate(180deg);\n  }\n\n  to {\n    transform: rotate(0deg);\n  }\n"], ["\n  from {\n    transform: rotate(180deg);\n  }\n\n  to {\n    transform: rotate(0deg);\n  }\n"])));
    exports.ListHeaderStyled = (0, styled_components_1.default)(styles_1.ListBaseItemStyled).attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            componentName: COMPONENT_NAME,
            theme: props.theme,
            defaultTheme: theme_1.defaultThemeList
        })
    }); })(templateObject_6 || (templateObject_6 = (0, tslib_1.__makeTemplateObject)(["\n  gap: 12px;\n\n  ", ";\n\n  .list-header__trail-content {\n    margin-right: 0;\n    margin-left: auto;\n  }\n\n  .list-header__collapse-icon-wpapper {\n    border-radius: 8px;\n    margin-right: 0;\n    margin-left: auto;\n    /* TODO \u043E\u0431\u0435\u0440\u0442\u043A\u0430 24*24, \u0438\u043A\u043E\u043D\u043A\u0430 12*12 => \u043D\u0443\u0436\u0435\u043D padding 6px, \u0430 SUPER_PIXEL 4px :( */\n    ", "\n  }\n\n  .list-header__collapse-icon {\n    animation: ", "\n      0.3s both 1;\n  }\n"], ["\n  gap: 12px;\n\n  ", ";\n\n  .list-header__trail-content {\n    margin-right: 0;\n    margin-left: auto;\n  }\n\n  .list-header__collapse-icon-wpapper {\n    border-radius: 8px;\n    margin-right: 0;\n    margin-left: auto;\n    /* TODO \u043E\u0431\u0435\u0440\u0442\u043A\u0430 24*24, \u0438\u043A\u043E\u043D\u043A\u0430 12*12 => \u043D\u0443\u0436\u0435\u043D padding 6px, \u0430 SUPER_PIXEL 4px :( */\n    ", "\n  }\n\n  .list-header__collapse-icon {\n    animation: ", "\n      0.3s both 1;\n  }\n"])), function (_a) {
        var theme = _a.theme, isSelected = _a.isSelected, isDisabled = _a.isDisabled;
        if (isSelected) {
            return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n        .list-header__collapse-icon-wpapper {\n          background: ", ";\n          .list-header__collapse-icon {\n            color: ", ";\n          }\n        }\n      "], ["\n        .list-header__collapse-icon-wpapper {\n          background: ", ";\n          .list-header__collapse-icon {\n            color: ", ";\n          }\n        }\n      "])), theme.components[COMPONENT_NAME]
                .backgroundSelectedDropdownIcon, theme.components[COMPONENT_NAME]
                .colorSelectedDropdownIcon);
        }
        else if (isDisabled) {
            return (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = (0, tslib_1.__makeTemplateObject)(["\n        .list-header__collapse-icon-wpapper {\n          background: ", ";\n          .list-header__collapse-icon {\n            color: ", ";\n          }\n        }\n      "], ["\n        .list-header__collapse-icon-wpapper {\n          background: ", ";\n          .list-header__collapse-icon {\n            color: ", ";\n          }\n        }\n      "])), theme.components[COMPONENT_NAME]
                .backgroundDisabledDropdownIcon, theme.components[COMPONENT_NAME]
                .colorDisabledDropdownIcon);
        }
        return (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = (0, tslib_1.__makeTemplateObject)(["\n      .list-header__collapse-icon-wpapper {\n        background: ", ";\n        .list-header__collapse-icon {\n          color: ", ";\n        }\n      }\n      :hover {\n        .list-header__collapse-icon-wpapper {\n          background: ", ";\n          .list-header__collapse-icon {\n            color: ", ";\n          }\n        }\n      }\n    "], ["\n      .list-header__collapse-icon-wpapper {\n        background: ", ";\n        .list-header__collapse-icon {\n          color: ", ";\n        }\n      }\n      :hover {\n        .list-header__collapse-icon-wpapper {\n          background: ", ";\n          .list-header__collapse-icon {\n            color: ", ";\n          }\n        }\n      }\n    "])), theme.components[COMPONENT_NAME]
            .backgroundDefaultDropdownIcon, theme.components[COMPONENT_NAME].colorDefaultDropdownIcon, theme.components[COMPONENT_NAME]
            .backgroundHoverDropdownIcon, theme.components[COMPONENT_NAME].colorHoverDropdownIcon);
    }, style_utils_1.Padding.allSide(1.5), function (_a) {
        var isSelected = _a.isSelected;
        return isSelected ? rotateCollapseIcon : rotateRevertCollapseIcon;
    });
    exports.ListHeaderStyled.defaultProps = {
        theme: themes_1.LIGHT_THEME
    };
    exports.IconWrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = (0, tslib_1.__makeTemplateObject)(["\n  display: flex;\n  ", "\n"], ["\n  display: flex;\n  ", "\n"])), style_utils_1.Padding.allSide(1));
    var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
});
