import{t as e}from"./C5TUQmaQ.js";import{n as t,t as n}from"./BxGhAxl0.js";import{Bn as r,Dn as i,En as a,Nn as o,a as s,ar as c,cr as l,jn as u,or as d,wn as f,xn as p,zn as m}from"./B-6m3w3Q.js";var h=s(`outline`,`chevron-left`,`ChevronLeft`,[[`path`,{d:`M15 6l-6 6l6 6`,key:`svg-0`}]]),g={class:`flex shrink-0 items-center overflow-hidden rounded-lg border border-base-content/12`},_=[`disabled`],v=[`disabled`],y={key:0,class:`flex items-center border-r border-r-base-content/10 bg-base-200/80 px-1 text-xs text-base-content/40`},b=[`onClick`],x=[`disabled`],S=[`disabled`],C=o({__name:`ConnectionsPagination`,props:{currentPage:{},totalPages:{},visiblePages:{}},emits:[`goToPage`,`previous`,`next`],setup(o,{emit:s}){let C=s;return(s,w)=>(m(),i(`div`,g,[f(`button`,{class:`flex h-7 min-w-7 cursor-pointer items-center justify-center border-r border-none border-r-base-content/10 bg-base-200/80 px-1.5 text-xs text-base-content transition-all duration-150 ease-out hover:not-disabled:bg-base-content/10 disabled:cursor-not-allowed disabled:opacity-40`,disabled:o.currentPage===0,onClick:w[0]||=e=>C(`goToPage`,0)},[u(c(t),{size:14})],8,_),f(`button`,{class:`flex h-7 min-w-7 cursor-pointer items-center justify-center border-r border-none border-r-base-content/10 bg-base-200/80 px-1.5 text-xs text-base-content transition-all duration-150 ease-out hover:not-disabled:bg-base-content/10 disabled:cursor-not-allowed disabled:opacity-40`,disabled:o.currentPage===0,onClick:w[1]||=e=>C(`previous`)},[u(c(h),{size:14})],8,v),(m(!0),i(p,null,r(o.visiblePages,(e,t)=>(m(),i(p,{key:e},[t>0&&o.visiblePages[t-1]!==e-1?(m(),i(`span`,y,` ··· `)):a(``,!0),f(`button`,{class:d([`flex h-7 min-w-8 cursor-pointer items-center justify-center border-r border-none border-r-base-content/10 bg-base-200/80 px-1.5 text-xs text-base-content transition-all duration-150 ease-out last:border-r-0 hover:not-disabled:bg-base-content/10 disabled:cursor-not-allowed disabled:opacity-40`,{"bg-primary! text-primary-content! hover:bg-primary!":o.currentPage===e}]),onClick:t=>C(`goToPage`,e)},l(e+1),11,b)],64))),128)),f(`button`,{class:`flex h-7 min-w-7 cursor-pointer items-center justify-center border-r border-none border-r-base-content/10 bg-base-200/80 px-1.5 text-xs text-base-content transition-all duration-150 ease-out last:border-r-0 hover:not-disabled:bg-base-content/10 disabled:cursor-not-allowed disabled:opacity-40`,disabled:o.currentPage>=o.totalPages-1,onClick:w[2]||=e=>C(`next`)},[u(c(e),{size:14})],8,x),f(`button`,{class:`flex h-7 min-w-7 cursor-pointer items-center justify-center border-none bg-base-200/80 px-1.5 text-xs text-base-content transition-all duration-150 ease-out last:border-r-0 hover:not-disabled:bg-base-content/10 disabled:cursor-not-allowed disabled:opacity-40`,disabled:o.currentPage>=o.totalPages-1,onClick:w[3]||=e=>C(`goToPage`,o.totalPages-1)},[u(c(n),{size:14})],8,S)]))}}),w=Object.assign(C,{__name:`ConnectionsPagination`});export{w as t};