"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _PaginationSt = require("./Pagination.st.css.js");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/Carousel/Pagination/Pagination.tsx";
function _withDotClass(comp) {
  var {
    className: existingClassName
  } = comp.props;
  // Merge the dot class with the existing className (which includes active state)
  var mergedClassName = existingClassName ? "".concat((0, _PaginationSt.st)(_PaginationSt.classes.dot), " ").concat(existingClassName) : (0, _PaginationSt.st)(_PaginationSt.classes.dot);
  return /*#__PURE__*/_react.default.cloneElement(comp, {
    className: mergedClassName
  });
}
function Pagination(_ref) {
  var {
    className,
    originalClassName,
    pages
  } = _ref;
  return /*#__PURE__*/_react.default.createElement("div", {
    className: (0, _PaginationSt.st)(_PaginationSt.classes.root, className, originalClassName),
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 21,
      columnNumber: 5
    }
  }, pages.map(page => _withDotClass(page)));
}
Pagination.displayName = 'Pagination';
var _default = exports.default = Pagination;
//# sourceMappingURL=Pagination.js.map