import{d as x,c as s,a,k as i,t as d,F as c,m,e as u,o as n,y as P}from"./index-BaNRFt4f.js";const f={key:0,class:"flex items-center justify-between px-4 py-3 border-t border-gray-200 bg-white"},k={class:"text-xs text-gray-500"},v={class:"font-medium"},h={class:"font-medium"},w={class:"font-medium"},C={class:"flex items-center gap-1"},B=["disabled"],N=["onClick"],V={key:1,class:"text-xs text-gray-400 px-1"},$=["disabled"],F={key:1,class:"px-4 py-2 border-t border-gray-200 bg-white"},S={class:"text-xs text-gray-500"},z=x({__name:"PaginationBar",props:{currentPage:{},lastPage:{},from:{},to:{},total:{}},emits:["update:currentPage"],setup(t,{emit:y}){const g=t,b=y;function l(o){o>=1&&o<=g.lastPage&&o!==g.currentPage&&b("update:currentPage",o)}return(o,e)=>t.lastPage>1?(n(),s("div",f,[a("p",k,[e[2]||(e[2]=i(" Mostrando ",-1)),a("span",v,d(t.from),1),e[3]||(e[3]=i(" a ",-1)),a("span",h,d(t.to),1),e[4]||(e[4]=i(" de ",-1)),a("span",w,d(t.total),1),e[5]||(e[5]=i(" registros ",-1))]),a("div",C,[a("button",{onClick:e[0]||(e[0]=r=>l(t.currentPage-1)),disabled:t.currentPage<=1,class:"px-2 py-1 text-xs rounded border border-gray-300 text-gray-600 hover:bg-gray-50 disabled:opacity-40 disabled:cursor-not-allowed transition"}," Ant. ",8,B),(n(!0),s(c,null,m(t.lastPage,r=>(n(),s(c,{key:r},[r===1||r===t.lastPage||r>=t.currentPage-1&&r<=t.currentPage+1?(n(),s("button",{key:0,onClick:T=>l(r),class:P(["w-7 h-7 text-xs rounded border transition",r===t.currentPage?"bg-primary-600 text-white border-primary-600":"border-gray-300 text-gray-600 hover:bg-gray-50"])},d(r),11,N)):r===t.currentPage-2||r===t.currentPage+2?(n(),s("span",V,"...")):u("",!0)],64))),128)),a("button",{onClick:e[1]||(e[1]=r=>l(t.currentPage+1)),disabled:t.currentPage>=t.lastPage,class:"px-2 py-1 text-xs rounded border border-gray-300 text-gray-600 hover:bg-gray-50 disabled:opacity-40 disabled:cursor-not-allowed transition"}," Sig. ",8,$)])])):t.total>0?(n(),s("div",F,[a("p",S,d(t.total)+" registro(s)",1)])):u("",!0)}});export{z as _};
