import type { ViewInfo } from './ViewInfo'; /** * Delimiter expressing nesting within a view group name - e.g. `Reports/Sales/Monthly`. Groups * persist as plain strings; nesting is a display-time interpretation of this delimiter. */ export declare const VIEW_GROUP_DELIMITER = "/"; /** Node within a tree of views built from their slash-delimited group paths. */ export interface ViewGroupNode { /** Leaf segment of this group's path - i.e. its display name. */ name: string; /** Full delimited path to this group. */ path: string; /** Child groups nested within this group, sorted alpha. */ children: ViewGroupNode[]; /** Views directly within this group, sorted alpha by name. */ views: ViewInfo[]; } /** Split a group path into its segments. Null/empty path returns an empty array. */ export declare function splitGroupPath(path: string): string[]; /** Leaf segment of a group path - e.g. 'Reports/Sales' returns 'Sales'. Null path returns null. */ export declare function getGroupLeaf(path: string): string; /** Parent of a group path - e.g. 'Reports/Sales' returns 'Reports'. Top-level/null returns null. */ export declare function getGroupParent(path: string): string; /** Compose a parent path and leaf name into a full path. Either side may be null/empty. */ export declare function composeGroupPath(parent: string, leaf: string): string; /** * Normalize a group path - trim each segment, drop any empty ones (e.g. 'a//b', '/a', 'a/ '), and * rejoin. Returns null if nothing remains. */ export declare function normalizeGroupPath(path: string): string; /** True if `candidate` is the same group path as `ancestor` or is nested anywhere beneath it. */ export declare function isGroupSameOrDescendant(candidate: string, ancestor: string): boolean; /** * All distinct group paths across the given views, including implied ancestors - a view in 'A/B/C' * implies groups 'A', 'A/B', and 'A/B/C'. Depth-first, siblings sorted alpha. */ export declare function getAllGroupPaths(views: ViewInfo[]): string[]; /** * Build a tree of groups and their member views from the views' slash-delimited group paths. * Sibling groups and views are sorted alpha at every level. Ungrouped views returned separately. */ export declare function buildViewGroupTree(views: ViewInfo[]): { roots: ViewGroupNode[]; ungrouped: ViewInfo[]; };