import { DivisionType } from '../text_parsers/ast.js'; import { FragmentPosition, FragmentReverseTransformation } from '../text_parsers/fragments.js'; import { TextParserContext } from '../text_parsers/parsers.js'; import { Transformation } from '../text_parsers/transformers.js'; export interface TableOfContents { articles?: TableOfContentsArticle[]; divisions?: TableOfContentsDivision[]; } export interface TableOfContentsArticle { id?: string; line: string; type: "article"; } export type TableOfContentsArticlePositioned = TableOfContentsArticle & { originalTransformation: FragmentReverseTransformation; position: FragmentPosition; }; export interface TableOfContentsDivision { articles?: TableOfContentsArticle[]; divisions?: TableOfContentsDivision[]; id?: string; line: string; type: DivisionType; } export type TableOfContentsDivisionPositioned = TableOfContentsDivision & { articles?: TableOfContentsArticlePositioned[]; divisions?: TableOfContentsDivisionPositioned[]; originalTransformation: FragmentReverseTransformation; position: FragmentPosition; }; export interface TableOfContentsPositioned { articles?: TableOfContentsArticlePositioned[]; divisions?: TableOfContentsDivisionPositioned[]; } export declare function addPositionsToTableOfContentsItems({ context, tableOfContents, transformation, }: { context: TextParserContext; tableOfContents: TableOfContents; transformation: Transformation; }): Generator; export declare function getExtractedTableOfContentsFromTextBill(textBill: string): TableOfContents; export declare function walkTableOfContents(tableOfContents: TableOfContents | TableOfContentsDivision): Generator;