1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./jsx-runtime-Bbmj7Sro.js";import{I as n,L as r,mt as i}from"./pro-solid-svg-icons-fwFcmN_U.js";import{t as a}from"./prop-types-D9WxI36-.js";import{st as o}from"./index-_WGeRyKy.js";var s=e(a()),c=`_container_drscv_1`,l=`_pagination_drscv_8`,u=`_block_drscv_12`,d=`_hideOnDesktop_drscv_19`,f=`_hideOnMobile_drscv_24`,p=t(),m=({content:e=``,className:t=``,icon:n=null,hideOnMobile:r,active:i,disabled:a,action:s=()=>{}})=>(0,p.jsx)(o,{className:`${u} ${r?f:``} ${t||``}`,active:i,disabled:a,action:s,label:e,icon:n,theme:`SECONDARY`}),h=({...e})=>(0,p.jsx)(m,{...e,icon:n}),g=({...e})=>(0,p.jsx)(m,{...e,icon:r}),_=({...e})=>(0,p.jsx)(m,{...e,disabled:!0,icon:i,hideOnMobile:!0});s.default.number,s.default.func,s.default.number;var v=({first:e,data:t,disabled:n=!1,onClick:r=()=>{}})=>{let i=t==null?void 0:t.pageInfo,a=t==null?void 0:t.pageCursors,o=t==null?void 0:t.totalPages;if(!o||o<=1||!i||!(a!=null&&a.around))return null;let s=a.around.some(e=>e.pageNumber===1),u=a.around.some(e=>e.pageNumber===o),v=()=>{if(i.hasNextPage){var t;r({first:e,after:(a==null||(t=a.next)==null?void 0:t.cursor)||null,last:null,before:null})}},y=()=>{if(i.hasPreviousPage){var t;r({first:e,after:(a==null||(t=a.previous)==null?void 0:t.cursor)||null,last:null,before:null})}},b=t=>()=>{r({first:e,after:t==null?void 0:t.cursor,last:null,before:null})};return(0,p.jsx)(`div`,{className:c,children:(0,p.jsxs)(`div`,{className:l,children:[i.hasPreviousPage&&(0,p.jsx)(h,{disabled:n,action:y}),!s&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m,{content:1,disabled:n,action:b(a.first)}),(0,p.jsx)(_,{className:`_hideOnMobile_drscv_24`})]}),a.around.map(e=>(0,p.jsx)(m,{className:f,content:e.pageNumber,disabled:n,action:e.isCurrent?null:b(e),active:e.isCurrent,hideOnMobile:!e.isCurrent},e.pageNumber)),a.around.filter(e=>e.isCurrent).map(e=>(0,p.jsx)(m,{className:d,content:e.pageNumber,disabled:n,action:e.isCurrent?null:b(e),active:e.isCurrent,hideOnMobile:!e.isCurrent},e.pageNumber)),!u&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(_,{className:`_hideOnMobile_drscv_24`}),(0,p.jsx)(m,{content:o,disabled:n,action:b(a.last)})]}),i.hasNextPage&&(0,p.jsx)(g,{disabled:n,action:v})]})})};v.propTypes={first:s.default.number,data:s.default.object,onClick:s.default.func};export{v as t}; 2//# sourceMappingURL=Pagination-7uOcG8Ht.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.