"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/jsx-runtime.js"),v=require("react"),j=require("../../Field/dropdown/Dropdown.js"),o=require("../styles.js"),b=require("../utils.js"),u=require("../../../utils/index.js");const R=({totalItems:d,rowsPerPage:l,narrowPaginationText:r={indicator:"Page",preposition:"of"},currentPage:a,onChangePage:p,...i})=>{const x=u.getId(i["data-testid"]),c=u.getId(i["data-trackid"]),t=b.getNumberOfPages(d,l),g=v.useMemo(()=>Array(t).fill(null).map((n,m)=>{const s=m+1;return{value:s,label:s.toString()}}),[t]);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(o.PaginationText,{children:r.indicator}),e.jsxRuntimeExports.jsx(j.Dropdown,{variant:"small",options:g,onChange:n=>p(Number(n.value)),value:{value:a,label:a.toString()},noMargin:!0,width:"82px","data-testid":x(),"data-trackid":c()}),e.jsxRuntimeExports.jsxs(o.PaginationText,{children:[r.preposition," ",t]})]})};exports.default=R;
