import _pt from "prop-types";
import Button from '../Button/Button';
import React from 'react';
export default function Page(_ref) {
  var href = _ref.href,
      index = _ref.index,
      isActive = _ref.isActive,
      onPageChange = _ref.onPageChange;
  return /*#__PURE__*/React.createElement("li", null, isActive ? /*#__PURE__*/React.createElement("span", {
    className: "ds-c-button ds-c-button--ghost ds-c-pagination__current-page",
    "aria-current": "true"
  }, index) : /*#__PURE__*/React.createElement(Button, {
    variation: "ghost",
    href: href,
    onClick: onPageChange,
    "aria-label": "page ".concat(index)
  }, index));
}
Page.propTypes = {
  /**
     * Defines the page number.
     */
  index: _pt.number.isRequired,

  /**
     * Renders current page if true, other links if false.
     */
  isActive: _pt.bool.isRequired,

  /**
     * A callback function used to handle state changes.
     */
  onPageChange: _pt.func,

  /**
     * Defines application-specific routing in url for links.
     */
  href: _pt.string.isRequired
};