"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = Page;
var _compat = _interopRequireDefault(require("preact/compat"));
var _Button = _interopRequireDefault(require("../Button/Button"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function Page(_ref) {
  var href = _ref.href,
    index = _ref.index,
    isActive = _ref.isActive,
    onPageChange = _ref.onPageChange;
  return /*#__PURE__*/_compat.default.createElement(_compat.default.Fragment, null, isActive ? /*#__PURE__*/_compat.default.createElement("span", {
    className: "ds-c-button ds-c-button--ghost ds-c-pagination__current-page",
    "aria-current": "page"
  }, index) : /*#__PURE__*/_compat.default.createElement(_Button.default, {
    variation: "ghost",
    href: href,
    onClick: onPageChange,
    "aria-label": "page ".concat(index)
  }, index));
}