import{Ot as e,W as t,X as n,Y as r,et as i,jt as a,kt as o,lt as s,q as c,tt as l,ut as u}from"./BOiFqXHJ.js";import{B as d,R as f,V as p,z as m}from"./DahdqIKi.js";var h={class:`flex shrink-0 items-center overflow-hidden rounded-lg border border-base-content/12`},g=[`disabled`],_=[`disabled`],v={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`},y=[`onClick`],b=[`disabled`],x=[`disabled`],S=l({__name:`ConnectionsPagination`,props:{currentPage:{},totalPages:{},visiblePages:{}},emits:[`goToPage`,`previous`,`next`],setup(l,{emit:S}){let C=S;return(S,w)=>(s(),n(`div`,h,[c(`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:l.currentPage===0,onClick:w[0]||=e=>C(`goToPage`,0)},[i(e(m),{size:14})],8,g),c(`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:l.currentPage===0,onClick:w[1]||=e=>C(`previous`)},[i(e(p),{size:14})],8,_),(s(!0),n(t,null,u(l.visiblePages,(e,i)=>(s(),n(t,{key:e},[i>0&&l.visiblePages[i-1]!==e-1?(s(),n(`span`,v,` ··· `)):r(``,!0),c(`button`,{class:o([`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!":l.currentPage===e}]),onClick:t=>C(`goToPage`,e)},a(e+1),11,y)],64))),128)),c(`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:l.currentPage>=l.totalPages-1,onClick:w[2]||=e=>C(`next`)},[i(e(d),{size:14})],8,b),c(`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:l.currentPage>=l.totalPages-1,onClick:w[3]||=e=>C(`goToPage`,l.totalPages-1)},[i(e(f),{size:14})],8,x)]))}}),C=Object.assign(S,{__name:`ConnectionsPagination`});export{C as t};