{"version":3,"file":"ListItemCollection.mjs","names":[],"sources":["../../../../../../../../components-base/src/list/item/ListItemCollection.ts"],"sourcesContent":["import type { ListModelContext } from \"../ListModelContext\";\nimport { ListItem } from \"./ListItem\";\n\n/**\n * The items the list currently shows.\n *\n * Read from the table's row model on every access rather than kept: the rows\n * are what sorting, filtering and paging produce, so a stored copy would be a\n * second answer to the same question.\n */\nexport class ListItemCollection<T> {\n  public readonly context: ListModelContext<T>;\n\n  public constructor(context: ListModelContext<T>) {\n    this.context = context;\n  }\n\n  public get entries(): ListItem<T>[] {\n    return this.context.dataTable\n      .getRowModel()\n      .rows.map((r) => ListItem.fromRow(this, r));\n  }\n}\n"],"mappings":";;;;;;;;;;;AAUA,IAAa,qBAAb,MAAmC;CACjC;CAEA,YAAmB,SAA8B;EAC/C,KAAK,UAAU;CACjB;CAEA,IAAW,UAAyB;EAClC,OAAO,KAAK,QAAQ,UACjB,YAAY,CAAC,CACb,KAAK,KAAK,MAAM,SAAS,QAAQ,MAAM,CAAC,CAAC;CAC9C;AACF"}