/**
 * SSMLExtractor
 *
 * Service for extracting embedded SSML from PIE item content and converting
 * it into QTI 3.0 accessibility catalogs.
 *
 * Authors can embed <speak> SSML tags directly in content for convenience.
 * The extractor automatically:
 * 1. Parses markup and finds all <speak> elements
 * 2. Extracts SSML content with language metadata
 * 3. Generates accessibility catalogs with unique IDs
 * 4. Cleans visual markup (removes SSML, adds data-catalog-idref)
 *
 * This enables proper pronunciation, emphasis, and pacing for TTS without
 * requiring authors to maintain separate catalog files.
 *
 * Part of PIE Assessment Toolkit.
 */
import type { AccessibilityCatalog, ConfigEntity } from "@pie-players/pie-players-shared/types";
/**
 * Result from extracting SSML from entire item config
 */
export interface ExtractionResult {
    catalogs: AccessibilityCatalog[];
    cleanedConfig: ConfigEntity;
}
/**
 * Sanitize an SSML subtree in place: remove disallowed attributes and
 * replace disallowed elements with their text content (so phrasing order
 * is preserved but no scripts / iframes / unknown tags survive).
 */
export declare function sanitizeSsmlElement(element: Element): void;
/**
 * Serialize a sanitized `<speak>` element back to a minimal SSML string.
 * Uses a manual walker instead of `outerHTML` so that any namespace
 * quirks (e.g. `xmlns` attributes added by the HTML parser) are
 * normalised and disallowed descendants cannot reappear through quirks
 * in the serializer.
 */
export declare function serializeSsmlElement(element: Element): string;
export declare function sanitizeSsmlString(input: string): string;
/**
 * SSMLExtractor Service
 *
 * Extracts embedded SSML from PIE content and generates accessibility catalogs.
 */
export declare class SSMLExtractor {
    private catalogCounter;
    /**
     * Extract SSML from entire item config (markup + models)
     *
     * @param config Item configuration with potential embedded SSML
     * @returns Extracted catalogs and cleaned config
     */
    extractFromItemConfig(config: ConfigEntity): ExtractionResult;
    /**
     * Extract SSML from markup string
     *
     * @param markup HTML markup potentially containing <speak> elements
     * @param idPrefix Prefix for generating catalog IDs
     * @returns Extracted catalogs and cleaned markup
     */
    private extractFromMarkup;
    /**
     * Generate unique catalog ID
     *
     * @param prefix Context prefix (e.g., 'prompt-q1', 'choice-q1-a')
     * @returns Unique catalog ID (e.g., 'auto-prompt-q1-0')
     */
    private generateCatalogId;
    /**
     * Reset counter (useful for testing or new extraction contexts)
     */
    reset(): void;
}
