import { type LucideIcon } from 'lucide-react'; import type { FileManagerItem } from './types'; export declare function formatFileSize(bytes: number, locale: string, t: (key: string, fallback: string) => string): string; /** Icon component per item — folders first, then a MIME-family lookup. */ export declare function getItemIcon(item: FileManagerItem): LucideIcon; /** Children of a folder, folders first, then locale-aware by name. */ export declare function childrenOf(items: FileManagerItem[], folderId: string | null, locale: string): FileManagerItem[]; /** * Every item whose ancestry passes through `folderId` (folders + files, any * depth) — the full subtree beneath a folder, excluding the folder itself. * Feeds AG Grid Tree Data when `groupByFolder` is on (the flat `childrenOf` * only returns the immediate level). Sort order matches `childrenOf` — folders * first, then locale-aware by name — so sibling order is stable at every depth. */ export declare function descendantsOf(items: FileManagerItem[], folderId: string | null, locale: string): FileManagerItem[]; /** * AG Grid Tree Data path for an item: the id-chain from the current folder's * direct child down to (and including) the item. Walk `parentId` up, stopping * at `currentFolderId` (exclusive), then reverse and append the item's own id. * Every returned id is a real folder/file row, so AG Grid never synthesises * filler group rows. `itemsById` need only cover the current subtree. */ export declare function pathWithinFolder(item: FileManagerItem, itemsById: Map, currentFolderId: string | null): string[]; /** Path from the root down to `folderId` (exclusive of the virtual root). */ export declare function pathTo(items: FileManagerItem[], folderId: string | null): FileManagerItem[]; /** * Ids of the given folders plus every folder nested inside them. Used to * exclude invalid targets from the move-destination tree (a folder can never * be moved into itself or one of its descendants). */ export declare function withDescendantFolderIds(items: FileManagerItem[], ids: string[]): Set; /** True when the two id lists contain the same set of ids. */ export declare function sameIdSet(a: string[], b: string[]): boolean; //# sourceMappingURL=utils.d.ts.map