PageSourceSearch

https://crm.fyvoo.ai/build/assets/OpportunitiesPagination-CKbty9-J.js

js fyvoo.ai collected 2026-10-05 14:20:07 UTC 5,384 bytes, 1 lines download raw bytes

1import{dl as r,aN as f,cA as j,D as n,U as v,R as N,S as y,V as k}from"./ui-CuL8nVZ1.js";import{S as w,e as S,f as _,a as C,c as p}from"./select-MR0OG1uO.js";import{u as z}from"./use-translations-DCRhm25D.js";import"./index-DpESdoWP.js";import"./index-CjzWIa3x.js";import"./index-BbdQ0HBX.js";import"./index-Bio3fqE6.js";import"./index-C4Zoahut.js";import"./floating-ui.react-dom-BOQlUy4c.js";import"./index-PzTGnhVK.js";import"./index-CSqkHT-8.js";import"./index-wOsjmRLQ.js";import"./index-CSRjkESU.js";import"./scroll-area-CujPUfN3.js";import"./select-scroll-BoHGZSvk.js";import"./app-CqPVFghJ.js";function J({pagination:d,viewMode:b="table",onPageChange:i,onPerPageChange:x}){const{t:o}=z();if(b==="kanban")return null;if(!d||d.total===0)return r.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 border-t border-border/40 bg-background px-6 py-6",children:[r.jsx("div",{className:"flex items-center justify-center w-12 h-12 bg-gradient-to-br from-muted/40 to-muted/20 border border-border/30 rounded-lg",children:r.jsx(f,{className:"h-5 w-5 text-muted-foreground/60"})}),r.jsxs("div",{className:"text-center space-y-1",children:[r.jsx("div",{className:"text-sm font-medium text-foreground",children:o("no_opportunities_found","No opportunities found")}),r.jsx("div",{className:"text-xs text-muted-foreground",children:o("try_adjusting_search","Try adjusting your search or filter criteria")})]})]});const{current_page:t,last_page:a,per_page:h,total:l,from:c,to:m}=d,g=(()=>{const e=[];if(a<=5)for(let s=1;s<=a;s++)e.push(s);else if(t<=3){for(let s=1;s<=4;s++)e.push(s);e.push("..."),e.push(a)}else if(t>=a-2){e.push(1),e.push("...");for(let s=a-3;s<=a;s++)e.push(s)}else{e.push(1),e.push("...");for(let s=t-1;s<=t+1;s++)e.push(s);e.push("..."),e.push(a)}return e})();return r.jsxs("div",{className:"flex flex-col items-center justify-between gap-4 border-t border-border/40 bg-background px-4 py-2 sm:flex-row transition-all duration-200",children:[r.jsx("div",{className:"text-muted-foreground flex items-center gap-1 text-sm",children:r.jsxs("div",{className:"flex shrink-0 items-center gap-2 px-2 py-1 bg-background/60 backdrop-blur-sm border border-border/30 rounded-md",children:[r.jsx(j,{className:"h-3 w-3 text-primary/60"}),r.jsx("span",{children:o("showing","Showing")}),r.jsx("span",{className:"font-semibold text-foreground",children:(c==null?void 0:c.toLocaleString())||0}),r.jsx("span",{children:o("to","to")}),r.jsx("span",{className:"font-semibold text-foreground",children:(m==null?void 0:m.toLocaleString())||0}),r.jsx("span",{children:o("of","of")}),r.jsx("span",{className:"font-semibold text-primary",children:(l==null?void 0:l.toLocaleString())||0}),r.jsx("span",{children:o("opportunities","opportunities")})]})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx(n,{variant:"outline",size:"sm",onClick:()=>i(1),disabled:t===1,className:"h-8 w-8 p-0 bg-background/60 backdrop-blur-sm border-border/30 hover:bg-primary/10 hover:border-primary/30 transition-all duration-200",children:r.jsx(v,{className:"h-4 w-4"})}),r.jsx(n,{variant:"outline",size:"sm",onClick:()=>i(t-1),disabled:t===1,className:"h-8 w-8 p-0 bg-background/60 backdrop-blur-sm border-border/30 hover:bg-primary/10 hover:border-primary/30 transition-all duration-200",children:r.jsx(N,{className:"h-4 w-4"})})]}),r.jsx("div",{className:"flex items-center gap-1",children:g.map((e,u)=>r.jsx("div",{children:e==="..."?r.jsx("span",{className:"px-2 py-1 text-sm text-muted-foreground",children:"..."}):r.jsx(n,{variant:t===e?"default":"outline",size:"sm",onClick:()=>i(e),className:`h-8 w-8 p-0 text-sm transition-all duration-200 ${t===e?"bg-primary text-primary-foreground shadow-md border-primary":"bg-background/60 backdrop-blur-sm border-border/30 hover:bg-primary/10 hover:border-primary/30"}`,children:e})},u))}),r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx(n,{variant:"outline",size:"sm",onClick:()=>i(t+1),disabled:t===a,className:"h-8 w-8 p-0 bg-background/60 backdrop-blur-sm border-border/30 hover:bg-primary/10 hover:border-primary/30 transition-all duration-200",children:r.jsx(y,{className:"h-4 w-4"})}),r.jsx(n,{variant:"outline",size:"sm",onClick:()=>i(a),disabled:t===a,className:"h-8 w-8 p-0 bg-background/60 backdrop-blur-sm border-border/30 hover:bg-primary/10 hover:border-primary/30 transition-all duration-200",children:r.jsx(k,{className:"h-4 w-4"})})]})]}),r.jsxs("div",{className:"flex shrink-0 items-center gap-2 px-2 py-1 bg-background/60 backdrop-blur-sm border border-border/30 rounded-md",children:[r.jsx("span",{className:"whitespace-nowrap text-sm text-muted-foreground",children:o("show","Show")}),r.jsxs(w,{value:h.toString(),onValueChange:e=>x(parseInt(e)),children:[r.jsx(S,{className:"h-7 min-w-[4.25rem] w-[4.25rem] shrink-0 px-2 text-sm bg-transparent border-border/30 hover:border-primary/30 transition-colors duration-200 [&_[data-slot=select-value]]:truncate-none",children:r.jsx(_,{})}),r.jsxs(C,{className:"bg-background/95 backdrop-blur-sm border border-border/50",children:[r.jsx(p,{value:"25",children:"25"}),r.jsx(p,{value:"50",children:"50"}),r.jsx(p,{value:"100",children:"100"})]})]}),r.jsx("span",{className:"whitespace-nowrap text-sm text-muted-foreground",children:o("per_page","per page")})]})]})}export{J as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.