"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PageIndicator = void 0;
var react_1 = __importDefault(require("react"));
var styled_components_1 = __importDefault(require("styled-components"));
var usePageIndicator_1 = require("../hooks/paging/usePageIndicator");
var classnames_1 = require("../utils/classnames");
var styleguide_1 = require("../utils/styleguide");
exports.PageIndicator = function (_a) {
    var current = _a.current, total = _a.total, className = _a.className, props = __rest(_a, ["current", "total", "className"]);
    var indicators = usePageIndicator_1.usePageIndicator({ current: current, total: total });
    return (react_1.default.createElement(DotContainer, __assign({}, props, { className: classnames_1.cn('lwc-page-indicator', className) }), indicators.map(function (indicator) { return (react_1.default.createElement(Dot, __assign({}, indicator, { key: indicator.key, className: classnames_1.cn('lwc-page-dot', indicator.className) }))); })));
};
var DotContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  position: absolute;\n  bottom: ", ";\n  left: 0;\n  right: 0;\n\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: center;\n\n  & > * {\n    margin: 0 ", ";\n  }\n\n  @media ", " {\n    bottom: ", ";\n  }\n"], ["\n  position: absolute;\n  bottom: ", ";\n  left: 0;\n  right: 0;\n\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: center;\n\n  & > * {\n    margin: 0 ", ";\n  }\n\n  @media ", " {\n    bottom: ", ";\n  }\n"])), styleguide_1.space._16, styleguide_1.space._4, styleguide_1.device._768, styleguide_1.space._48);
var Dot = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n  width: ", ";\n  height: ", ";\n\n  border-radius: 50%;\n  background-color: ", ";\n\n  opacity: .325;\n\n  &.lwc-current {\n    opacity: 1;\n  }\n"], ["\n  width: ", ";\n  height: ", ";\n\n  border-radius: 50%;\n  background-color: ", ";\n\n  opacity: .325;\n\n  &.lwc-current {\n    opacity: 1;\n  }\n"])), styleguide_1.space._8, styleguide_1.space._8, styleguide_1.color.gray600);
var templateObject_1, templateObject_2;
