{"version":3,"file":"BlogPagination.C_dqAp3w.mjs","names":["_Fragment"],"sources":["https:/framerusercontent.com/modules/ljshydY9zRLVLjt3Bh6W/Iue5ncER92CBigj2IOhk/BlogPagination.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";const INK=\"rgb(88, 81, 79)\";const CHEVRON=\"rgb(194, 195, 198)\";const SURFACE=\"rgb(248, 249, 251)\";const ARROW=\"M6.079 9.47l6.073-6.074c.293-.292.768-.292 1.061 0l.709.709c.292.292.292.766 0 1.06L9.11 10l4.813 4.836c.292.293.292.767 0 1.06l-.71.708c-.292.292-.767.292-1.06 0L6.08 10.53c-.293-.293-.293-.768 0-1.06z\";// Breakpoints match the site's text style presets, not the page breakpoints:\n// the type ramp switches at 563 and 1200, so the bar switches with it.\nconst CSS=`\n.wm-pag { display:flex; align-items:center; justify-content:center; gap:16px;\n  padding:8px 24px; background:${SURFACE}; border-radius:8px; width:451px;\n  max-width:100%; box-sizing:border-box; font-family:\"Basier Circle\", sans-serif; }\n.wm-pag a { color:${INK}; text-decoration:none; white-space:nowrap;\n  font-size:16px; line-height:24px; }\n.wm-pag-edge { display:flex; align-items:center; flex:1 1 0; min-width:0; }\n.wm-pag-edge a { display:flex; align-items:center; }\n.wm-pag-edge-prev { justify-content:flex-start; }\n.wm-pag-edge-next { justify-content:flex-end; }\n.wm-pag-nums { display:flex; align-items:center; list-style:none; margin:0; padding:0; }\n.wm-pag-nums a { display:block; padding:0 6px; font-weight:400; }\n.wm-pag-nums a[aria-current] { font-weight:700; }\n.wm-pag svg { display:block; flex:0 0 auto; }\n@media (max-width: 1199.98px) { .wm-pag { width:355px; } }\n@media (max-width: 562.98px) {\n  .wm-pag { gap:8px; padding:8px; width:282px; }\n  .wm-pag a { font-size:14px; line-height:20px; }\n  .wm-pag-label { display:none; }\n}\n`;function Chevron({flip}){return /*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"20\",height:\"20\",viewBox:\"0 0 20 20\",style:{transform:flip?\"rotate(180deg)\":undefined},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{fill:CHEVRON,d:ARROW})});}/**\n * Numbered blog pagination, matching watermelon.ai.\n *\n * Renders `Previous 1 … N Next` in a rounded grey bar. Prev and next are always\n * present and clamp to the first and last page, as the live bar does. Page 1\n * points at `basePath` itself rather than `basePath/page/1/`, so the first page\n * keeps one canonical URL.\n *\n * Sizing is done with media queries rather than a per-breakpoint property, so a\n * single instance is correct everywhere. The bar takes the live widths (451 /\n * 355 / 282); the prev and next groups split the leftover space equally, which\n * is what keeps the number run optically centred, and the word labels drop on\n * phone leaving just the chevrons.\n *\n * @framerIntrinsicWidth 451\n * @framerIntrinsicHeight 40\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function BlogPagination(props){const{currentPage,totalPages,basePath,prevLabel,nextLabel}=props;const total=Math.max(1,Math.round(totalPages));const current=Math.min(Math.max(1,Math.round(currentPage)),total);const root=(basePath||\"/blog\").replace(/\\/+$/,\"\");// Dutch paths are translated in Framer (/nl/blog/pagina/2), English keep /page/.\nconst segment=/^\\/nl(\\/|$)/.test(root)?\"pagina\":\"page\";const href=page=>page<=1?root:`${root}/${segment}/${page}`;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:CSS}),/*#__PURE__*/_jsxs(\"nav\",{className:\"wm-pag\",\"aria-label\":\"Pagination\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"wm-pag-edge wm-pag-edge-prev\",children:/*#__PURE__*/_jsxs(\"a\",{href:href(Math.max(1,current-1)),rel:\"prev\",children:[/*#__PURE__*/_jsx(Chevron,{}),/*#__PURE__*/_jsx(\"span\",{className:\"wm-pag-label\",children:prevLabel})]})}),/*#__PURE__*/_jsx(\"ol\",{className:\"wm-pag-nums\",children:Array.from({length:total},(_,i)=>i+1).map(page=>/*#__PURE__*/_jsx(\"li\",{children:/*#__PURE__*/_jsx(\"a\",{href:href(page),\"aria-current\":page===current?\"page\":undefined,children:page})},page))}),/*#__PURE__*/_jsx(\"div\",{className:\"wm-pag-edge wm-pag-edge-next\",children:/*#__PURE__*/_jsxs(\"a\",{href:href(Math.min(total,current+1)),rel:\"next\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"wm-pag-label\",children:nextLabel}),/*#__PURE__*/_jsx(Chevron,{flip:true})]})})]})]});}BlogPagination.defaultProps={currentPage:1,totalPages:4,basePath:\"/blog\",prevLabel:\"Previous\",nextLabel:\"Next\"};addPropertyControls(BlogPagination,{currentPage:{type:ControlType.Number,title:\"Current\",min:1,max:50,step:1,displayStepper:true},totalPages:{type:ControlType.Number,title:\"Total\",min:1,max:50,step:1,displayStepper:true},basePath:{type:ControlType.String,title:\"Base path\",placeholder:\"/blog\"},prevLabel:{type:ControlType.String,title:\"Previous\"},nextLabel:{type:ControlType.String,title:\"Next\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogPagination\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"40\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"451\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogPagination.map"],"mappings":"qKAsBE,SAAS,EAAQ,CAAC,QAAM,CAAC,OAAoB,EAAK,MAAM,CAAC,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,MAAM,CAAC,UAAU,EAAK,iBAAiB,IAAA,EAAS,EAAE,cAAc,OAAO,SAAsB,EAAK,OAAO,CAAC,KAAK,EAAQ,EAAE,CAAK,CAAC,CAAC,CAAC,CAAE,CAkBzQ,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,cAAY,aAAW,WAAS,YAAU,aAAW,EA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