import { DiscriminatedItem } from './item.js'; /** * Returns the item path given an array of ids * @param ids consecutive item ids * @returns path of consecutive items */ export declare const buildPathFromIds: (...ids: string[]) => string; /** * Returns an array of item ids given an item path * @param {string} path item's path * @returns ids array */ export declare const getIdsFromPath: (path?: string) => string[]; /** * Returns the parent id given an item path */ export declare function getParentFromPath(itemPath: string): string | undefined; /** * Returns the last item id in the path * @param {string} itemPath item's path * @returns children ids */ export declare function getChildFromPath(itemPath: string): string; /** * Asserts whether an item is a child of another item given their paths * @param {string} path item path * @param {string} parentPath parent path * @returns whether item is child of given parent */ export declare const isChildOf: (path: string, parentPath: string) => boolean; /** * Asserts whether a given item is a descendant of a parent item * @param path path of the item under test * @param parentPath path of the parent item * @returns whether the item is bellow the parent in the tree (any depth level) */ export declare const isDescendantOf: (path: string, parentPath: string) => boolean; /** * Asserts whether an item is a root item */ export declare const isRootItem: ({ path, }: Pick) => boolean; /** * Sorts children given order array * @param children children to be sorted * @param idsOrder non-exhaustive ids in order * @returns array of ordered children */ export declare const sortChildrenWith: (children: DiscriminatedItem[], idsOrder: string[]) => DiscriminatedItem[];