(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/themes", "../Button", "../utils/theme/getTheme", "../utils/defineResponsibleSize", "./themes"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.StyledIcons = exports.StyledEllipses = exports.StyledPages = exports.Elems = exports.PaginationContainer = void 0;
    var tslib_1 = require("tslib");
    var styled_components_1 = (0, tslib_1.__importStar)(require("styled-components"));
    var themes_1 = require("../Pallette/themes");
    var Button_1 = (0, tslib_1.__importDefault)(require("../Button"));
    var getTheme_1 = require("../utils/theme/getTheme");
    var defineResponsibleSize_1 = require("../utils/defineResponsibleSize");
    var themes_2 = require("./themes");
    var COMPONENT_NAME = "pagination";
    exports.PaginationContainer = styled_components_1.default.div.attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            defaultTheme: themes_2.defaultThemePagination,
            theme: props.theme,
            componentName: COMPONENT_NAME
        })
    }); })(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n  position: relative;\n  padding: 8px;\n  margin: 0;\n  display: flex;\n  ", ";\n  align-items: center;\n  justify-content: center;\n  flex-direction: row;\n\n  ", "\n"], ["\n  position: relative;\n  padding: 8px;\n  margin: 0;\n  display: flex;\n  ", ";\n  align-items: center;\n  justify-content: center;\n  flex-direction: row;\n\n  ", "\n"])), function (_a) {
        var width = _a.width;
        return (0, defineResponsibleSize_1.defineResponsibleWidth)(width);
    }, function (_a) {
        var isFill = _a.isFill, theme = _a.theme;
        return isFill && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n      background: ", ";\n      border-radius: ", ";\n    "], ["\n      background: ", ";\n      border-radius: ", ";\n    "])), theme.components[COMPONENT_NAME].background, theme.shape.borderRadiusMedium);
    });
    exports.PaginationContainer.defaultProps = {
        theme: themes_1.LIGHT_THEME
    };
    exports.Elems = styled_components_1.default.ul(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n  position: relative;\n  display: flex;\n  width: 100%;\n  align-items: center;\n  justify-content: ", ";\n  flex-direction: row;\n"], ["\n  position: relative;\n  display: flex;\n  width: 100%;\n  align-items: center;\n  justify-content: ", ";\n  flex-direction: row;\n"])), function (_a) {
        var isMinimized = _a.isMinimized;
        return isMinimized ? "center" : "space-between";
    });
    exports.StyledPages = (0, styled_components_1.default)(Button_1.default).attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            defaultTheme: themes_2.defaultThemePagination,
            theme: props.theme,
            componentName: COMPONENT_NAME
        })
    }); })(templateObject_7 || (templateObject_7 = (0, tslib_1.__makeTemplateObject)(["\n  border-radius: 16px;\n  align-items: center;\n  justify-content: center;\n  color: ", ";\n  padding-left: 12px;\n  padding-right: 12px;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  height: 40px;\n\n  ", ";\n\n  ", "\n\n  ", "\n"], ["\n  border-radius: 16px;\n  align-items: center;\n  justify-content: center;\n  color: ", ";\n  padding-left: 12px;\n  padding-right: 12px;\n  padding-top: 8px;\n  padding-bottom: 8px;\n  height: 40px;\n\n  ", ";\n\n  ", "\n\n  ", "\n"])), function (_a) {
        var theme = _a.theme;
        return theme.components[COMPONENT_NAME].color;
    }, function (_a) {
        var isDisabled = _a.isDisabled, theme = _a.theme;
        return !isDisabled && (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = (0, tslib_1.__makeTemplateObject)(["\n      &:hover {\n        background-color: ", ";\n        color: ", ";\n      }\n    "], ["\n      &:hover {\n        background-color: ", ";\n        color: ", ";\n      }\n    "])), theme.components[COMPONENT_NAME]
            .backgroundPageHover, theme.components[COMPONENT_NAME].colorPageHover);
    }, function (_a) {
        var isActive = _a.isActive, theme = _a.theme, isDisabled = _a.isDisabled;
        return isActive &&
            !isDisabled && (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = (0, tslib_1.__makeTemplateObject)(["\n      background-color: ", ";\n      color: ", ";\n    "], ["\n      background-color: ", ";\n      color: ", ";\n    "])), theme.components[COMPONENT_NAME]
            .backgroundPageActive, theme.components[COMPONENT_NAME].colorPageActive);
    }, function (_a) {
        var isDisabled = _a.isDisabled, theme = _a.theme;
        return isDisabled && (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = (0, tslib_1.__makeTemplateObject)(["\n      background-color: transparent;\n      color: ", ";\n      cursor: not-allowed;\n    "], ["\n      background-color: transparent;\n      color: ", ";\n      cursor: not-allowed;\n    "])), theme.components[COMPONENT_NAME].colorDisabled);
    });
    exports.StyledPages.defaultProps = {
        theme: themes_1.LIGHT_THEME
    };
    exports.StyledEllipses = styled_components_1.default.li.attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            defaultTheme: themes_2.defaultThemePagination,
            theme: props.theme,
            componentName: COMPONENT_NAME
        })
    }); })(templateObject_9 || (templateObject_9 = (0, tslib_1.__makeTemplateObject)(["\n  border-radius: 16px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  user-select: none;\n  color: ", ";\n\n  ", "\n"], ["\n  border-radius: 16px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  user-select: none;\n  color: ", ";\n\n  ", "\n"])), function (_a) {
        var theme = _a.theme;
        return theme.components[COMPONENT_NAME].color;
    }, function (_a) {
        var theme = _a.theme, isDisabled = _a.isDisabled;
        return isDisabled && (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = (0, tslib_1.__makeTemplateObject)(["\n      color: ", ";\n    "], ["\n      color: ", ";\n    "])), theme.components[COMPONENT_NAME].colorDisabled);
    });
    exports.StyledEllipses.defaultProps = {
        theme: themes_1.LIGHT_THEME
    };
    exports.StyledIcons = (0, styled_components_1.default)(Button_1.default).attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            defaultTheme: themes_2.defaultThemePagination,
            theme: props.theme,
            componentName: COMPONENT_NAME
        })
    }); })(templateObject_10 || (templateObject_10 = (0, tslib_1.__makeTemplateObject)(["\n  position: relative;\n  align-items: center;\n  display: flex;\n  justify-content: center;\n  margin-left: 12px;\n  margin-right: 8px;\n  svg {\n    color: ", ";\n  }\n"], ["\n  position: relative;\n  align-items: center;\n  display: flex;\n  justify-content: center;\n  margin-left: 12px;\n  margin-right: 8px;\n  svg {\n    color: ", ";\n  }\n"])), function (_a) {
        var theme = _a.theme, isDisabled = _a.isDisabled;
        return isDisabled
            ? theme.components[COMPONENT_NAME].colorDisabled
            : theme.components[COMPONENT_NAME].color;
    });
    exports.StyledIcons.defaultProps = {
        theme: themes_1.LIGHT_THEME
    };
    var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10;
});
