import { CollectionState, FiltersMap } from '@wix/bex-core'; import { NestedTableNodeStateOptimisticActionsPublicAPI } from './NestedTableNodeStateOptimisticActions'; export interface NestedTableNodeStatePublicAPI< C extends string, T, F extends FiltersMap, > { /** * Get the node this node is a child of * @overrideType () => [NestedTableNodeState](./?path=/story/base-components-collections-nestedtable--nestedtablenodestate) | `undefined` */ getParent(): NestedTableNodeStatePublicAPI< C, TD, FD > | null; /** * The collection of the node * @overrideType [CollectionState](./?path=/story/common-state--collectionstate) */ readonly children?: CollectionState; /** * The optimistic actions of the node, affects items both in nested & flat mode * @overrideType [NestedTableOptimisticActions](./?path=/story/base-components-collections-nestedtable--nestedtableoptimisticactions) */ readonly optimisticActions?: NestedTableNodeStateOptimisticActionsPublicAPI; /** * The "parent" item of this node * @overrideType () => T | null */ getData: () => TD | null; /** * Toggle the expand/collapse state of the node */ toggleExpand: () => void; /** * Whether the node is expanded */ readonly expanded: boolean; /** * The depth of the node in the tree */ readonly depth: number; /** * Get all the nodes that are descendants of this node from all levels * @overrideType () => [NestedTableNodeState](./?path=/story/base-components-collections-nestedtable--nestedtablenodestate)[] */ getDescendants(): NestedTableNodeStatePublicAPI< C, TD, FD >[]; }