"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.PageFooter = PageFooter;
var _react = _interopRequireDefault(require("react"));
var _Paging = require("./Paging");
var _theming = require("@storybook/theming");
var _components = require("@storybook/components");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const Container = (0, _theming.withTheme)(_theming.styled.div(_ref => {
  let {
    theme
  } = _ref;
  return {
    display: 'flex',
    padding: '20px',
    justifyContent: 'space-between',
    background: theme.background.content
  };
}));
const StyledButton = (0, _theming.styled)(_components.Button)({
  transform: 'none'
});
function PageFooter(_ref2) {
  let {
    canApprove,
    retriesCount,
    retry,
    onRetryChange,
    onApprove
  } = _ref2;
  return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Paging.Paging, {
    activePage: retry,
    onPageChange: onRetryChange,
    pagesCount: retriesCount
  }), canApprove ? /*#__PURE__*/_react.default.createElement(StyledButton, {
    secondary: true,
    outline: true,
    onClick: onApprove
  }, 'Approve') : null);
}