import Collection, { DefaultDataItem, ItemKey } from "./index"; import State from "../state"; import Agile from "../agile"; export declare type GroupKey = string | number; export interface GroupAddOptionsInterface { method?: 'unshift' | 'push'; overwrite?: boolean; background?: boolean; } export interface GroupConfigInterface { key?: GroupKey; } export default class Group extends State> { collection: () => Collection; _output: Array; _states: Array<() => State>; notFoundPrimaryKeys: Array; constructor(agileInstance: Agile, collection: Collection, initialItems?: Array, config?: GroupConfigInterface); get output(): Array; get states(): Array>; /** * Checks if the group contains the primaryKey */ has(primaryKey: ItemKey): boolean; /** * Returns the size of the group */ get size(): number; /** * Removes a item at primaryKey from the group */ remove(itemKeys: ItemKey | ItemKey[], options?: { background?: boolean; }): this; /** * Adds a key to a group */ add(itemKeys: ItemKey | ItemKey[], options?: GroupAddOptionsInterface): this; /** * @internal * Will build the group -> it will set the output to the collection values */ build(): void; }