import{c as u}from"./vIrG_3DP.js";import{I as g}from"./7LhRut4W.js";import{I as m,a as x}from"./CtC8Wk0Q.js";import{e as v,c as r,a as s,b as a,h as i,F as l,s as f,o as d,l as h,t as P,n as y}from"./Fc7vEJt1.js";var C=u("outline","chevron-left","ChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]);const p={class:"flex shrink-0 items-center overflow-hidden rounded-lg border border-base-content/12"},k=["disabled"],w=["disabled"],j={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"},I=["onClick"],z=["disabled"],$=["disabled"],L=v({__name:"ConnectionsPagination",props:{currentPage:{},totalPages:{},visiblePages:{}},emits:["goToPage","previous","next"],setup(e,{emit:c}){const n=c;return(T,o)=>(d(),r("div",p,[s("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:e.currentPage===0,onClick:o[0]||(o[0]=t=>n("goToPage",0))},[a(i(m),{size:14})],8,k),s("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:e.currentPage===0,onClick:o[1]||(o[1]=t=>n("previous"))},[a(i(C),{size:14})],8,w),(d(!0),r(l,null,f(e.visiblePages,(t,b)=>(d(),r(l,{key:t},[b>0&&e.visiblePages[b-1]!==t-1?(d(),r("span",j," ··· ")):h("",!0),s("button",{class:y(["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!":e.currentPage===t}]),onClick:V=>n("goToPage",t)},P(t+1),11,I)],64))),128)),s("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:e.currentPage>=e.totalPages-1,onClick:o[2]||(o[2]=t=>n("next"))},[a(i(g),{size:14})],8,z),s("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:e.currentPage>=e.totalPages-1,onClick:o[3]||(o[3]=t=>n("goToPage",e.totalPages-1))},[a(i(x),{size:14})],8,$)]))}}),D=Object.assign(L,{__name:"ConnectionsPagination"});export{D as _};
