{"version":3,"file":"BlogPagination.1mOOEWHc.mjs","names":["_Fragment","__esmMin","init_jsx_runtime","c","p","addPropertyControls","init_framer_DJ_0WPVq","Chevron","flip","CHEVRON","ARROW","BlogPagination","props","total","totalPages","current","currentPage","root","basePath","segment","href","page","l","CSS","prevLabel","i","nextLabel","INK","init_BlogPagination","ControlType"],"sources":["https:/framerusercontent.com/modules/ljshydY9zRLVLjt3Bh6W/5KiBDXp4X8VVVaW9bBFM/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\";// No quotes anywhere in this CSS: React's SSR escapes them to &quot; inside\n// <style>, which the browser keeps literally, causing hydration error #425.\n// 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:transparent; border-radius:4px; width:451px;\n  max-width:100%; box-sizing:border-box; font-family:Inter, 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:500; color:#170A07; text-decoration:underline; text-decoration-color:#28D987; text-decoration-thickness:2px; text-underline-offset:8px; }\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\":{\"framerIntrinsicWidth\":\"451\",\"framerSupportedLayoutWidth\":\"auto\",\"framerIntrinsicHeight\":\"40\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogPagination.map"],"mappings":"A,qKAwBE,SAASO,EAAQ,CAAC,QAAM,CAAC,M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