var _excluded = ["children", "disabled"];
var _icons;
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
import React from 'react';
import { IconFirstPage, IconLastPage, IconKeyboardArrowLeft, IconKeyboardArrowRight } from '@defencedigital/icon-library';
import { StyledButton } from './partials/StyledButton';
export var PAGINATION_BUTTON_VARIANT = {
  FIRST: 'First',
  LAST: 'Last',
  PREV: 'Previous',
  NEXT: 'Next'
};
var icons = (_icons = {}, _defineProperty(_icons, PAGINATION_BUTTON_VARIANT.FIRST, /*#__PURE__*/React.createElement(IconFirstPage, {
  "aria-hidden": true
})), _defineProperty(_icons, PAGINATION_BUTTON_VARIANT.LAST, /*#__PURE__*/React.createElement(IconLastPage, {
  "aria-hidden": true
})), _defineProperty(_icons, PAGINATION_BUTTON_VARIANT.PREV, /*#__PURE__*/React.createElement(IconKeyboardArrowLeft, {
  "aria-hidden": true
})), _defineProperty(_icons, PAGINATION_BUTTON_VARIANT.NEXT, /*#__PURE__*/React.createElement(IconKeyboardArrowRight, {
  "aria-hidden": true
})), _icons);
export var PaginationButton = function PaginationButton(_ref) {
  var children = _ref.children,
    disabled = _ref.disabled,
    rest = _objectWithoutProperties(_ref, _excluded);
  return /*#__PURE__*/React.createElement(StyledButton, _extends({
    $isDisabled: disabled,
    "aria-label": "".concat(children, " page"),
    disabled: disabled
  }, rest), icons[children]);
};
PaginationButton.displayName = 'PaginationButton';