lms/public/build/assets/table-page-size-OCfjNXER.js
2025-12-15 12:26:23 +01:00

2 lines
995 B
JavaScript

import{u as l,j as e,by as g,e as x}from"./vendor-BKmmeuxg.js";import{B as h}from"./button-BpNwv2aE.js";import{D as j,a as b,b as w,c as N}from"./dropdown-menu-DO-po5c1.js";import{g as f}from"./route-B4ZMN77y.js";const M=a=>{const t=l(),o=f(t.url),{pageData:n,dropdownList:p,className:i,routeName:c,routeParams:m,pageSizeKey:u="per_page"}=a,{per_page:s}=n,d=r=>{x.get(route(c,{...m||{},...o,[u]:r}),{},{preserveState:!0})};return e.jsxs("div",{className:`relative h-10 ${i}`,children:[e.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-4",children:e.jsx(g,{className:"text-muted-foreground h-3 w-3"})}),e.jsxs(j,{children:[e.jsx(b,{children:e.jsx(h,{type:"button",variant:"ghost",className:"hover:border-primary border-border h-10 w-[72px] justify-start border",children:s})}),e.jsx(w,{align:"end",className:"min-w-[72px]",children:p.map(r=>e.jsx(N,{onClick:()=>d(r),className:`text-center ${s===r&&"bg-muted"}`,children:r},r))})]})]})};export{M as T};