import type { AccessibilityCatalog } from "@pie-players/pie-players-shared/types";
export type CatalogOwnerKind = "global" | "passage" | "itemModel";
export interface CatalogOwnerContext {
    ownerKind: CatalogOwnerKind;
    assessmentId?: string;
    sectionId?: string;
    canonicalItemId?: string;
    itemId?: string;
    passageId?: string;
    modelId?: string;
}
export type CatalogLookupContext = CatalogOwnerContext;
/**
 * Supported accessibility catalog types from QTI 3.0 / APIP
 */
export type CatalogType = "spoken" | "sign-language" | "braille" | "tactile" | "simplified-language" | "audio-description" | "extended-description" | string;
/**
 * Lookup options for catalog resolution
 */
export interface CatalogLookupOptions {
    /** Catalog type (e.g., 'spoken', 'sign-language') */
    type: CatalogType;
    /** Language code (e.g., 'en-US', 'es-ES') */
    language?: string;
    /** Fallback to default language if requested language not found */
    useFallback?: boolean;
    /** Scope used to resolve local catalog idrefs for rendered content */
    context?: CatalogLookupContext;
}
/**
 * Resolved catalog result
 */
export interface ResolvedCatalog {
    /** The catalog identifier */
    catalogId: string;
    /** The catalog type */
    type: CatalogType;
    /** The language code */
    language?: string;
    /** The content (HTML, URL, or plain text) */
    content: string;
    /** Source of the catalog (assessment or item) */
    source: "assessment" | "item";
}
/**
 * Statistics about available catalogs
 */
export interface CatalogStatistics {
    /** Total number of catalogs */
    totalCatalogs: number;
    /** Number of assessment-level catalogs */
    assessmentCatalogs: number;
    /** Number of item-level catalogs */
    itemCatalogs: number;
    /** Catalog types available */
    availableTypes: Set<CatalogType>;
    /** Languages available */
    availableLanguages: Set<string>;
}
/**
 * Accessibility Catalog Resolver Service
 *
 * Manages QTI 3.0 accessibility catalogs at both assessment and item levels.
 * Provides lookup and resolution services for alternative content representations.
 *
 * @example
 * ```typescript
 * // Initialize with assessment-level catalogs
 * const resolver = new AccessibilityCatalogResolver(assessment.accessibilityCatalogs);
 *
 * // Add item-level catalogs when rendering item
 * resolver.addItemCatalogs(item.accessibilityCatalogs);
 *
 * // Resolve catalog by identifier
 * const spokenContent = resolver.getAlternative('intro-passage', {
 *   type: 'spoken',
 *   language: 'en-US'
 * });
 *
 * // Check if catalog exists
 * if (resolver.hasCatalog('math-problem-1')) {
 *   const braille = resolver.getAlternative('math-problem-1', { type: 'braille' });
 * }
 * ```
 */
export declare class AccessibilityCatalogResolver {
    private assessmentCatalogs;
    private itemCatalogs;
    private scopedCatalogs;
    private defaultLanguage;
    private sanitizedSpokenCache;
    constructor(assessmentCatalogs?: AccessibilityCatalog[], defaultLanguage?: string);
    /**
     * Set the default language for fallback resolution
     */
    setDefaultLanguage(language: string): void;
    /**
     * Get the default language
     */
    getDefaultLanguage(): string;
    /**
     * Index catalogs into the appropriate map
     */
    private indexCatalogs;
    registerCatalogs(context: CatalogOwnerContext, catalogs?: AccessibilityCatalog[]): () => void;
    /**
     * Add item-level catalogs (called when rendering a new item)
     */
    addItemCatalogs(catalogs?: AccessibilityCatalog[]): void;
    /**
     * Clear item-level catalogs (called when leaving an item)
     */
    clearItemCatalogs(): void;
    /**
     * Check if a catalog exists (checks both assessment and item levels)
     */
    hasCatalog(catalogId: string): boolean;
    /**
     * Get alternative content for a catalog identifier
     *
     * Priority: Item-level catalogs take precedence over assessment-level
     */
    getAlternative(catalogId: string, options: CatalogLookupOptions): ResolvedCatalog | null;
    private resolveCard;
    private ensureSpokenSanitized;
    private getOwnerKey;
    private scopedCatalogEntries;
    private findScopedCandidates;
    private isCompatibleOwnerContext;
    private sanitizeCatalogs;
    /**
     * Find a matching catalog card based on lookup options
     */
    private findMatchingCard;
    /**
     * Get all available alternatives for a catalog identifier
     */
    getAllAlternatives(catalogId: string): ResolvedCatalog[];
    /**
     * Get all catalog identifiers available (both assessment and item)
     */
    getAllCatalogIds(): string[];
    /**
     * Get statistics about available catalogs
     */
    getStatistics(): CatalogStatistics;
    /**
     * Check if a specific catalog type is available for a given catalog ID
     */
    hasAlternativeType(catalogId: string, type: CatalogType): boolean;
    /**
     * Get all catalog IDs that have a specific type of alternative
     */
    getCatalogsByType(type: CatalogType): string[];
    /**
     * Reset all catalogs (both assessment and item)
     */
    reset(): void;
    /**
     * Destroy and cleanup
     */
    destroy(): void;
}
