(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", "../utils/theme/getTheme", "../Divider", "../Pallette/themes", "../Pallette/ZIndex", "./themes"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.DropdownWrapper = exports.DividerStyled = exports.DropdownItemsWrapper = exports.DropdownListWrapper = void 0;
    var tslib_1 = require("tslib");
    var styled_components_1 = (0, tslib_1.__importStar)(require("styled-components"));
    var getTheme_1 = require("../utils/theme/getTheme");
    var Divider_1 = (0, tslib_1.__importDefault)(require("../Divider"));
    var themes_1 = require("../Pallette/themes");
    var ZIndex_1 = require("../Pallette/ZIndex");
    var themes_2 = require("./themes");
    var COMPONENT_NAME = "dropdown";
    var getBorderRadius = function (direction) {
        switch (direction) {
            case "bottomLeft":
                return "0 16px 16px 16px";
            case "bottomRight":
                return "16px 0 16px 16px";
            case "topLeft":
                return "16px 16px 16px 0";
            case "topRight":
                return "16px 16px 0 16px";
            default:
                return "16px";
        }
    };
    exports.DropdownListWrapper = styled_components_1.default.div.attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            theme: props.theme,
            defaultTheme: themes_2.defaultThemeDropdown,
            componentName: COMPONENT_NAME
        })
    }); })(templateObject_4 || (templateObject_4 = (0, tslib_1.__makeTemplateObject)(["\n  ", ";\n  ", ";\n\n  ", ";\n"], ["\n  ", ";\n  ", ";\n\n  ", ";\n"])), function (_a) {
        var theme = _a.theme, direction = _a.direction;
        return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n    background: ", ";\n    ", ";\n    padding: ", ";\n    border-radius: ", ";\n  "], ["\n    background: ", ";\n    ", ";\n    padding: ", ";\n    border-radius: ", ";\n  "])), theme.components[COMPONENT_NAME].background, theme.shadows.hp.bottom, theme.shape.borderRadiusMedium, getBorderRadius(direction));
    }, function (_a) {
        var width = _a.width;
        return width && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n      width: ", ";\n    "], ["\n      width: ", ";\n    "])), width);
    }, function (_a) {
        var top = _a.top, left = _a.left;
        return top &&
            left && (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n      left: ", "px;\n      top: ", "px;\n      position: absolute;\n      z-index: ", ";\n    "], ["\n      left: ", "px;\n      top: ", "px;\n      position: absolute;\n      z-index: ", ";\n    "])), left, top, ZIndex_1.ZINDEX.tooltip);
    });
    exports.DropdownListWrapper.defaultProps = {
        theme: themes_1.LIGHT_THEME
    };
    exports.DropdownItemsWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = (0, tslib_1.__makeTemplateObject)(["\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n"], ["\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n"])));
    exports.DividerStyled = (0, styled_components_1.default)(Divider_1.default)(templateObject_6 || (templateObject_6 = (0, tslib_1.__makeTemplateObject)(["\n  margin-bottom: 16px;\n  margin-top: 16px;\n"], ["\n  margin-bottom: 16px;\n  margin-top: 16px;\n"])));
    exports.DropdownWrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = (0, tslib_1.__makeTemplateObject)(["\n  display: inline-block;\n  position: relative;\n"], ["\n  display: inline-block;\n  position: relative;\n"])));
    var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
});
