/**
 * Content Parser for Intelligent Living Docs Sync
 *
 * Parses increment spec.md into structured sections for classification and distribution.
 *
 * @module living-docs/content-parser
 */
/**
 * Represents a code block in the markdown
 */
export interface CodeBlock {
    language: string;
    content: string;
    startLine: number;
    endLine: number;
}
/**
 * Represents a link in the markdown
 */
export interface Link {
    text: string;
    url: string;
    type: 'internal' | 'external' | 'anchor';
}
/**
 * Represents an image reference
 */
export interface Image {
    alt: string;
    url: string;
    title?: string;
}
/**
 * Represents a parsed section of the spec
 */
export interface ParsedSection {
    id: string;
    heading: string;
    level: number;
    content: string;
    rawContent: string;
    codeBlocks: CodeBlock[];
    links: Link[];
    images: Image[];
    metadata?: Record<string, any>;
    startLine: number;
    endLine: number;
    children: ParsedSection[];
}
/**
 * Represents the complete parsed specification
 */
export interface ParsedSpec {
    frontmatter: Record<string, any>;
    sections: ParsedSection[];
    raw: string;
    filePath?: string;
}
/**
 * Parser options
 */
export interface ParserOptions {
    preserveCodeBlocks?: boolean;
    preserveLinks?: boolean;
    preserveImages?: boolean;
    maxDepth?: number;
    includeRawContent?: boolean;
}
/**
 * Content Parser class
 */
export declare class ContentParser {
    private options;
    constructor(options?: ParserOptions);
    /**
     * Parse markdown content into structured sections
     */
    parse(markdown: string, filePath?: string): ParsedSpec;
    /**
     * Parse sections from lines array (recursive for nested sections)
     */
    private parseSections;
    /**
     * Build section hierarchy (nest sub-sections under parent sections)
     */
    private buildHierarchy;
    /**
     * Set raw content for sections (including nested children)
     */
    private setRawContent;
    /**
     * Generate raw content for a section (including nested children)
     */
    private generateRawContent;
    /**
     * Extract code blocks from content
     */
    private extractCodeBlocks;
    /**
     * Extract links from content
     */
    private extractLinks;
    /**
     * Extract images from content
     */
    private extractImages;
    /**
     * Determine link type (internal/external/anchor)
     */
    private determineLinkType;
    /**
     * Convert heading to URL-safe slug
     */
    private slugify;
    /**
     * Find section by ID (recursive search)
     */
    findSection(sections: ParsedSection[], id: string): ParsedSection | null;
    /**
     * Get all sections flattened (no hierarchy)
     */
    flattenSections(sections: ParsedSection[]): ParsedSection[];
    /**
     * Get sections by level
     */
    getSectionsByLevel(sections: ParsedSection[], level: number): ParsedSection[];
    /**
     * Get section content without code blocks
     */
    getContentWithoutCode(section: ParsedSection): string;
}
/**
 * Factory function to create parser
 */
export declare function createContentParser(options?: ParserOptions): ContentParser;
/**
 * Convenience function to parse markdown
 */
export declare function parseMarkdown(markdown: string, options?: ParserOptions): ParsedSpec;
//# sourceMappingURL=content-parser.d.ts.map