import type { ButtonHTMLAttributes } from 'react'; export type FoldButtonProps = Omit, 'children'>; export type FoldRegion = { /** Unique identifier for this fold region */ id: string; /** Inclusive start line number (1-based) */ startLine: number; /** Inclusive end line number */ endLine: number; /** Optional label for the collapsed summary. When omitted, auto-generated from line count. */ label?: string; /** Whether the fold starts collapsed. Default: false */ defaultCollapsed?: boolean; /** Props forwarded to the fold gutter toggle button. */ toggleProps?: FoldButtonProps; /** Props forwarded to the collapsed fold summary button. */ summaryProps?: FoldButtonProps; }; export type DisplayItem = { type: 'line'; index: number; lineNumber: number; } | { type: 'fold-summary'; fold: FoldRegion; lineCount: number; }; export declare function getFoldSummaryLabel(fold: FoldRegion, lineCount: number): string; /** * Validates fold regions and returns a clean, sorted list. * Dev: logs warnings for invalid folds. Prod: silently filters them out. */ export declare function validateFolds(folds: FoldRegion[], totalLines: number, startingLineNumber?: number): FoldRegion[]; export declare function buildDisplayItems(totalLines: number, folds: FoldRegion[], collapsedFolds: Set, startingLineNumber: number): DisplayItem[];