"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = Page;
var _Button = _interopRequireDefault(require("../Button/Button"));
var _jsxRuntime = require("preact/compat/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function Page(_ref) {
  let {
    href,
    index,
    isActive,
    onPageChange
  } = _ref;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
    children: isActive ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
      className: "ds-c-button ds-c-button--ghost ds-c-pagination__current-page",
      "aria-current": "page",
      children: index
    }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
      variation: "ghost",
      href: href,
      onClick: onPageChange,
      "aria-label": `page ${index}`,
      children: index
    })
  });
}