import{t as e}from"./jsx-runtime-CiQ1k8xo.js";import{C as t,w as n}from"./remote-text-edit-session-CKSx0fn0.js";var r=e(),i={height:`18px`,width:`18px`},a=`text-token-text-secondary inline-flex h-8 w-8 cursor-interaction items-center justify-center rounded-md border border-transparent focus:outline-none focus-visible:ring-1 focus-visible:ring-token-focus-border enabled:hover:bg-token-list-hover-background enabled:hover:text-token-text-primary disabled:cursor-not-allowed disabled:opacity-40`;function o({currentIndex:e,totalCount:o,itemLabel:s,onChangeIndex:c,disabled:l=!1,testId:u=`popcorn-page-number-navigation`}){let d=o>0?e+1:0,f=!l&&o>0&&e>0,p=!l&&o>0&&e<o-1;return(0,r.jsxs)(`div`,{className:`flex items-center gap-0.5 text-sm tabular-nums`,"data-testid":u,children:[(0,r.jsx)(`button`,{type:`button`,"aria-label":`Go to previous ${s}`,"data-testid":`${u}-previous`,className:a,disabled:!f,onClick:()=>c(e-1),children:(0,r.jsx)(t,{style:i})}),(0,r.jsxs)(`span`,{className:`min-w-12 px-1 text-center text-token-text-primary`,"data-testid":`${u}-indicator`,children:[d,`/`,Math.max(0,o)]}),(0,r.jsx)(`button`,{type:`button`,"aria-label":`Go to next ${s}`,"data-testid":`${u}-next`,className:a,disabled:!p,onClick:()=>c(e+1),children:(0,r.jsx)(n,{style:i})})]})}export{o as t};
//# sourceMappingURL=PopcornPageNumberNavigation-B3rbf66d.js.map