{"version":3,"file":"ArchivePagination.CL_32rfJ.mjs","names":["React.Fragment","__esmMin","x","init_npm_react_18_3_1","p","c","init_jsx_runtime","init_framer_BEr93sCn","addPropertyControls","ControlType","pageHref","base","page","category","EditorialArchivePager","total","lastRoute","count","pageSize","numbers","i","n","current","link","relation","label","init_ArchivePagination"],"sources":["https:/framerusercontent.com/modules/iI0XBWDODfw7nvwQh38K/zIvCMEwOLH76vNg51DHv/ArchivePagination.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const pageSize=12;const lastRoute=27;function pageHref(page,category){const base=page===1?\"/inside-ten88\":\"/inside-ten88/page/\"+page;return category?base+\"?category=\"+encodeURIComponent(category):base;}/** @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto */export default function EditorialArchivePager({current=1,count=0,category,style}){const total=Math.min(lastRoute,Math.ceil(count/pageSize));if(total<2)return null;const numbers=Array.from({length:total},(_,i)=>i+1).filter(n=>total<=5||n===1||n===total||Math.abs(n-current)<=1||current===1&&n===3||current===total&&n===total-2);const link=(n,label,relation)=>/*#__PURE__*/_jsx(\"a\",{href:pageHref(n,category),rel:relation,\"aria-current\":!relation&&n===current?\"page\":undefined,\"aria-label\":relation?label+\" page\":\"Page \"+n,children:label},relation||n);return /*#__PURE__*/_jsxs(\"nav\",{className:\"ten88-editorial-pagination\",\"aria-label\":\"Editorial pages\",style:style,children:[/*#__PURE__*/_jsx(\"style\",{children:`.ten88-editorial-pagination{box-sizing:border-box;width:100%;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;padding:8px;font:500 14px/1.2 Inter,sans-serif;color:#f0ede2}.ten88-editorial-pagination a{box-sizing:border-box;min-height:44px;min-width:32px;padding:12px 8px;display:inline-flex;align-items:center;justify-content:center;color:inherit;text-decoration:none}.ten88-editorial-pagination [aria-current=\"page\"]{background:#f55038;color:#111}.ten88-editorial-pagination a:hover{text-decoration:underline}.ten88-editorial-pagination a:focus-visible{outline:2px solid currentColor;outline-offset:2px}.ten88-editorial-pagination span{padding:0 2px}@media(max-width:430px){.ten88-editorial-pagination{gap:1px}.ten88-editorial-pagination a{min-width:28px;padding-inline:6px}}`}),current>1&&link(current-1,\"Previous\",\"prev\"),numbers.map((n,i)=>/*#__PURE__*/_jsxs(React.Fragment,{children:[i>0&&n-numbers[i-1]>1&&/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",children:\"…\"}),link(n,String(n))]},n)),current<total&&link(current+1,\"Next\",\"next\")]});}addPropertyControls(EditorialArchivePager,{current:{type:ControlType.Number,title:\"Page\",defaultValue:1,min:1,step:1},count:{type:ControlType.Number,title:\"Articles\",defaultValue:0,min:0,step:1},category:{type:ControlType.String,title:\"Category\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"EditorialArchivePager\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ArchivePagination.map"],"mappings":"A,iLAA8K,SAASU,EAAS,EAAK,EAAS,CAAC,IAAMC,EAAKC,IAAO,EAAE,gBAAgB,sBAAsBA,EAAK,OAAOC,EAASF,EAAK,aAAa,mBAAmBE,CAAQ,EAAEF,CAAK,CAC3S,SAAwBG,EAAsB,CAAC,UAAQ,EAAE,QAAM,EAAE,WAAS,SAAO,CAAC,IAAMC,EAAM,KAAK,IAAIC,EAAU,KAAK,KAAKC,EAAMC,CAAQ,CAAC,EAAE,GAAGH,EAAM,EAAE,OAAO,KAAK,IAAMI,EAAQ,MAAM,KAAK,CAAC,OAAOJ,CAAK,GAAG,EAAE,IAAIK,EAAE,CAAC,CAAC,CAAC,OAAO,GAAGL,GAAO,GAAGM,IAAI,GAAGA,IAAIN,GAAO,KAAK,IAAIM,EAAEC,CA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