/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
import{computed as e,openBlock as a,createElementBlock as t,createElementVNode as p,toDisplayString as s,unref as l,Fragment as i,renderList as r,createVNode as o,withCtx as u}from"vue";import{useLocale as g}from"../../../hooks/useLocale.js";import{GscButton as d}from"../../../Button/index.js";import './Pager.css';/* empty css          */import n from"../../../_virtual/_plugin-vue_export-helper.js";const c={class:"gsc-pager"},m={class:"text-sm gsc-text-secondary"},v=["value"],f=["value"],z={class:"gsc-pager-jumper text-sm"},b=["value"],_={class:"gsc-text-secondary"},h=/* @__PURE__ */n({__name:"Pager",props:{page:{type:Number,default:1},pageSize:{type:Number,default:10},total:{type:Number,default:0},pageSizeOptions:{type:Array,default:()=>[10,20,50,100]}},emits:["update:page","update:pageSize"],setup(n){const h=n,{t:x}=g(),y=e(()=>Math.max(1,Math.ceil((h.total||0)/(h.pageSize||1))));return(e,g)=>(a(),t("div",c,[p("div",m,s(l(x)("gsc.grid.pager.total",{total:n.total})),1),p("select",{class:"gsc-control gsc-control-auto",value:n.pageSize,onChange:g[0]||(g[0]=a=>e.$emit("update:pageSize",Number(a.target.value)))},[(a(!0),t(i,null,r(n.pageSizeOptions,e=>(a(),t("option",{key:e,value:e},s(l(x)("gsc.grid.pager.pageSize",{size:e})),9,f))),128))],40,v),o(l(d),{variant:"default",size:"icon",disabled:n.page<=1,onClick:g[1]||(g[1]=a=>e.$emit("update:page",n.page-1))},{default:u(()=>[...g[4]||(g[4]=[p("span",{"aria-hidden":"true"},"‹",-1)])]),_:1},8,["disabled"]),p("div",z,[p("input",{class:"gsc-control gsc-control-page gsc-control-center",value:n.page,onChange:g[2]||(g[2]=a=>e.$emit("update:page",Number(a.target.value||1)))},null,40,b),p("span",_,"/ "+s(y.value),1)]),o(l(d),{variant:"default",size:"icon",disabled:n.page>=y.value,onClick:g[3]||(g[3]=a=>e.$emit("update:page",n.page+1))},{default:u(()=>[...g[5]||(g[5]=[p("span",{"aria-hidden":"true"},"›",-1)])]),_:1},8,["disabled"])]))}},[["__scopeId","data-v-6df635e7"]]);export{h as default};