import {
  CellStyleModule,
  ColumnApiModule,
  InfiniteRowModelModule,
  ModuleRegistry,
  PaginationModule,
  ValidationModule,
} from 'ag-grid-community';

// Imported for its side effect: registers only the (free, Community) AG Grid
// features the Kassenjournal grid actually uses - Infinite Row Model for
// server-side paging, plus pagination and cell styling. Scoped like this
// (instead of AllCommunityModule) keeps the grid's lazy route chunk from
// pulling in unused features (CSV/Excel export, charting integration,
// master/detail, etc). Only imported from cashbox.ts, so this code - and the
// rest of ag-grid-community - stays out of the eagerly-loaded main bundle.
ModuleRegistry.registerModules([
  InfiniteRowModelModule,
  PaginationModule,
  CellStyleModule,
  ColumnApiModule,
  ValidationModule,
]);
