"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _pagination = _interopRequireDefault(require("antd/lib/pagination"));
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var React = _interopRequireWildcard(require("react"));
require("./index.less");
var _excluded = ["simple", "size", "ifTotal", "disabled", "current", "defaultCurrent", "defaultPageSize", "showSizeChanger", "showQuickJumper", "hideOnSinglePage", "showLessItems", "total", "pageSize"];
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var antPagination = function antPagination(_ref) {
  var simple = _ref.simple,
    size = _ref.size,
    ifTotal = _ref.ifTotal,
    disabled = _ref.disabled,
    current = _ref.current,
    defaultCurrent = _ref.defaultCurrent,
    defaultPageSize = _ref.defaultPageSize,
    showSizeChanger = _ref.showSizeChanger,
    showQuickJumper = _ref.showQuickJumper,
    hideOnSinglePage = _ref.hideOnSinglePage,
    showLessItems = _ref.showLessItems,
    total = _ref.total,
    pageSize = _ref.pageSize,
    otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
  if (ifTotal) {
    otherProps.showTotal = function (total) {
      return "\u603B " + total + " \u6761";
    };
  }
  return (
    /*#__PURE__*/
    // <ConfigProvider locale={locale}>
    // </ConfigProvider>
    React.createElement(_pagination["default"], (0, _extends2["default"])({
      simple: simple,
      size: size,
      current: current || 1,
      defaultCurrent: current || 1,
      defaultPageSize: defaultPageSize || 1,
      disabled: disabled,
      hideOnSinglePage: hideOnSinglePage,
      pageSize: pageSize || 1
      // pageSizeOptions={pageSizeOptions}
      ,
      total: total || 1,
      showSizeChanger: showSizeChanger,
      showQuickJumper: showQuickJumper,
      showLessItems: showLessItems
    }, otherProps))
  );
};
antPagination.displayName = 'antPagination';
var _default = antPagination;
exports["default"] = _default;