import { __makeTemplateObject } from "tslib";
import styled, { css } from "styled-components";
import { LIGHT_THEME } from "../Pallette/themes";
import Button from "../Button";
import { getTheme } from "../utils/theme/getTheme";
import { defineResponsibleWidth } from "../utils/defineResponsibleSize";
import { defaultThemePagination } from "./themes";
var COMPONENT_NAME = "pagination";
export var PaginationContainer = styled.div.attrs(function (props) { return ({
    theme: getTheme({
        defaultTheme: defaultThemePagination,
        theme: props.theme,
        componentName: COMPONENT_NAME
    })
}); })(templateObject_2 || (templateObject_2 = __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 defineResponsibleWidth(width);
}, function (_a) {
    var isFill = _a.isFill, theme = _a.theme;
    return isFill && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n      background: ", ";\n      border-radius: ", ";\n    "], ["\n      background: ", ";\n      border-radius: ", ";\n    "])), theme.components[COMPONENT_NAME].background, theme.shape.borderRadiusMedium);
});
PaginationContainer.defaultProps = {
    theme: LIGHT_THEME
};
export var Elems = styled.ul(templateObject_3 || (templateObject_3 = __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";
});
export var StyledPages = styled(Button).attrs(function (props) { return ({
    theme: getTheme({
        defaultTheme: defaultThemePagination,
        theme: props.theme,
        componentName: COMPONENT_NAME
    })
}); })(templateObject_7 || (templateObject_7 = __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 && css(templateObject_4 || (templateObject_4 = __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 && css(templateObject_5 || (templateObject_5 = __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 && css(templateObject_6 || (templateObject_6 = __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);
});
StyledPages.defaultProps = {
    theme: LIGHT_THEME
};
export var StyledEllipses = styled.li.attrs(function (props) { return ({
    theme: getTheme({
        defaultTheme: defaultThemePagination,
        theme: props.theme,
        componentName: COMPONENT_NAME
    })
}); })(templateObject_9 || (templateObject_9 = __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 && css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n      color: ", ";\n    "], ["\n      color: ", ";\n    "])), theme.components[COMPONENT_NAME].colorDisabled);
});
StyledEllipses.defaultProps = {
    theme: LIGHT_THEME
};
export var StyledIcons = styled(Button).attrs(function (props) { return ({
    theme: getTheme({
        defaultTheme: defaultThemePagination,
        theme: props.theme,
        componentName: COMPONENT_NAME
    })
}); })(templateObject_10 || (templateObject_10 = __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;
});
StyledIcons.defaultProps = {
    theme: LIGHT_THEME
};
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10;
