import { j as jsxRuntimeExports, B as Button } from "./doenetml-cB_aZGJ5.js";
import React__default from "react";
import { u as useDoenetRenderer } from "./useDoenetRenderer-DN3Z9CW3.js";
const paginatorControls = React__default.memo(function PaginatorControls(props) {
  let { id, SVs, actions, callAction } = useDoenetRenderer(props, false);
  if (SVs.hidden) {
    return null;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { id, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id, style: { display: "inline-block", margin: "12px 0" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      Button,
      {
        id: id + "_previous",
        onClick: () => {
          callAction({
            action: actions.setPage,
            args: { number: SVs.currentPage - 1 }
          });
        },
        disabled: SVs.disabledDirectly || !(SVs.currentPage > 1),
        value: SVs.previousLabel
      }
    ) }),
    " " + SVs.pageLabel,
    " ",
    SVs.currentPage,
    " of ",
    SVs.numPages + " ",
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id, style: { display: "inline-block", margin: "12px 0" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      Button,
      {
        id: id + "_next",
        onClick: () => {
          callAction({
            action: actions.setPage,
            args: { number: SVs.currentPage + 1 }
          });
        },
        disabled: SVs.disabledDirectly || !(SVs.currentPage < SVs.numPages),
        value: SVs.nextLabel
      }
    ) })
  ] });
});
export {
  paginatorControls as default
};
