/**
 * Context Variable Store
 *
 * Standalone service for managing QTI 3.0 context variables.
 * Context variables are global assessment-level variables that can be
 * shared across items.
 *
 * Can be used independently by any assessment player without requiring
 * the full AssessmentPlayer.
 *
 * Part of PIE Assessment Toolkit.
 */
import type { ContextDeclaration } from "@pie-players/pie-players-shared/types";
/**
 * Standalone service for managing QTI 3.0 context variables.
 *
 * Context variables are global assessment-level variables that can be
 * shared across items. Can be used independently by any assessment player.
 *
 * @example
 * ```typescript
 * // Initialize with declarations
 * const store = new ContextVariableStore(declarations);
 *
 * // Get/set variables
 * const seed = store.get('RANDOM_SEED');
 * store.set('DIFFICULTY_LEVEL', 'hard');
 *
 * // Pass to items
 * const context = store.toObject();
 * await renderItem(item, session, context);
 *
 * // Persist in session
 * session.contextVariables = store.toObject();
 * ```
 */
export declare class ContextVariableStore {
    private variables;
    private declarations;
    /**
     * Initialize store with context declarations from assessment
     *
     * @param declarations QTI 3.0 context declarations
     */
    constructor(declarations?: ContextDeclaration[]);
    /**
     * Initialize context variables from declarations
     *
     * Sets each variable to its defaultValue or type-appropriate default.
     */
    initialize(declarations: ContextDeclaration[]): void;
    /**
     * Get context variable value
     *
     * @param identifier Variable identifier
     * @returns Variable value or undefined if not found
     */
    get(identifier: string): any;
    /**
     * Set context variable value
     *
     * @param identifier Variable identifier
     * @param value New value
     */
    set(identifier: string, value: any): void;
    /**
     * Check if variable exists
     */
    has(identifier: string): boolean;
    /**
     * Get all variable names
     */
    getIdentifiers(): string[];
    /**
     * Get all variables as object (for passing to PIE elements)
     *
     * @returns Plain object with all context variables
     */
    toObject(): Record<string, any>;
    /**
     * Load state from serialized object (for session restore)
     *
     * @param state Object containing context variable values
     */
    fromObject(state: Record<string, any>): void;
    /**
     * Clear all variables (reset to defaults)
     */
    reset(): void;
    /**
     * Get declaration for variable
     *
     * @param identifier Variable identifier
     * @returns Declaration or undefined if not found
     */
    getDeclaration(identifier: string): ContextDeclaration | undefined;
    /**
     * Get all declarations
     */
    getDeclarations(): ContextDeclaration[];
    /**
     * Get default value for QTI base type
     *
     * @private
     */
    private getDefaultValueForType;
    /**
     * Validate value matches declared type (basic validation)
     *
     * @private
     */
    private validateValue;
}
