/**
 * 配置验证模块
 * 使用Zod进行配置验证
 */
import { z } from 'zod';
/**
 * 配置验证错误
 */
export declare class ConfigValidationError extends Error {
    readonly errors: z.ZodError;
    constructor(message: string, errors: z.ZodError);
}
/**
 * 配置验证器
 */
export declare class ConfigValidator {
    /**
     * 验证配置
     *
     * @param config - 要验证的配置
     * @param schema - Zod模式
     * @returns 验证后的配置
     * @throws ConfigValidationError 如果配置验证失败
     */
    static validate<T>(config: unknown, schema: z.ZodSchema<T>): T;
    /**
     * 安全验证配置（不抛出异常）
     *
     * @param config - 要验证的配置
     * @param schema - Zod模式
     * @returns 验证结果
     */
    static safeValidate<T>(config: unknown, schema: z.ZodSchema<T>): {
        success: true;
        data: T;
    } | {
        success: false;
        error: z.ZodError;
    };
    /**
     * 创建StartOptions的部分验证模式
     * 注意：这是一个基础模式，可以根据需要扩展
     */
    static createStartOptionsSchema(): z.ZodObject<{
        loggerLevel: z.ZodOptional<z.ZodEnum<{
            DEBUG: "DEBUG";
            INFO: "INFO";
            WARN: "WARN";
            ERROR: "ERROR";
        }>>;
        showSplashScreen: z.ZodOptional<z.ZodEnum<{
            auto: "auto";
            always: "always";
            never: "never";
            "first-time-only": "first-time-only";
        }>>;
        minSplashScreenTime: z.ZodOptional<z.ZodNumber>;
        security: z.ZodOptional<z.ZodObject<{
            enableXSSProtection: z.ZodOptional<z.ZodBoolean>;
            validateConfig: z.ZodOptional<z.ZodBoolean>;
            sanitizeUserInput: z.ZodOptional<z.ZodBoolean>;
            csp: z.ZodOptional<z.ZodObject<{
                defaultSrc: z.ZodOptional<z.ZodArray<z.ZodString>>;
                scriptSrc: z.ZodOptional<z.ZodArray<z.ZodString>>;
                styleSrc: z.ZodOptional<z.ZodArray<z.ZodString>>;
                imgSrc: z.ZodOptional<z.ZodArray<z.ZodString>>;
                connectSrc: z.ZodOptional<z.ZodArray<z.ZodString>>;
                fontSrc: z.ZodOptional<z.ZodArray<z.ZodString>>;
                frameSrc: z.ZodOptional<z.ZodArray<z.ZodString>>;
                allowUnsafeInline: z.ZodOptional<z.ZodBoolean>;
                allowUnsafeEval: z.ZodOptional<z.ZodBoolean>;
            }, z.core.$strip>>;
        }, z.core.$strip>>;
    }, z.core.$loose>;
    /**
     * 验证配置并提供友好的错误信息
     *
     * @param config - 要验证的配置
     * @param schema - Zod模式
     * @returns 验证后的配置
     * @throws ConfigValidationError 如果配置验证失败，包含详细的错误信息
     */
    static validateWithFriendlyErrors<T>(config: unknown, schema: z.ZodSchema<T>): T;
}
//# sourceMappingURL=ConfigValidator.d.ts.map