import { NextRequest, NextResponse } from 'next/server';

interface CalendarRouteConfig {
    /**
     * Drizzle 数据库实例
     * 如果提供，将自动初始化 calendarDbService
     */
    db?: any;
    /**
     * 验证用户身份的函数
     * 应该返回用户信息或 null
     */
    validateAuth: (request: NextRequest) => Promise<{
        id: number;
    } | null>;
}
/**
 * 创建获取日历事件列表的处理器
 */
declare function createGetEventsHandler(config: CalendarRouteConfig): (request: NextRequest) => Promise<NextResponse<{
    success: boolean;
    error: string;
}> | NextResponse<{
    success: boolean;
    data: any;
    message: string;
}>>;
/**
 * 创建日历事件的处理器
 */
declare function createCreateEventHandler(config: CalendarRouteConfig): (request: NextRequest) => Promise<NextResponse<{
    success: boolean;
    error: string;
}> | NextResponse<{
    success: boolean;
    data: any;
    message: string;
}>>;
/**
 * 创建获取单个事件的处理器
 */
declare function createGetEventByIdHandler(config: CalendarRouteConfig): (request: NextRequest, { params }: {
    params: {
        id: string;
    };
}) => Promise<NextResponse<{
    success: boolean;
    error: string;
}> | NextResponse<{
    success: boolean;
    data: any;
    message: string;
}>>;
/**
 * 创建更新事件的处理器
 */
declare function createUpdateEventHandler(config: CalendarRouteConfig): (request: NextRequest, { params }: {
    params: {
        id: string;
    };
}) => Promise<NextResponse<{
    success: boolean;
    error: string;
}> | NextResponse<{
    success: boolean;
    data: any;
    message: string;
}>>;
/**
 * 创建删除事件的处理器
 */
declare function createDeleteEventHandler(config: CalendarRouteConfig): (request: NextRequest, { params }: {
    params: {
        id: string;
    };
}) => Promise<NextResponse<{
    success: boolean;
    error: string;
}> | NextResponse<{
    success: boolean;
    message: string;
}>>;
/**
 * 创建批量删除事件的处理器
 */
declare function createBatchDeleteEventsHandler(config: CalendarRouteConfig): (request: NextRequest) => Promise<NextResponse<{
    success: boolean;
    error: string;
}> | NextResponse<{
    success: boolean;
    data: {
        deletedCount: number;
    };
    message: string;
}>>;
/**
 * 创建配置处理器的工厂
 */
declare function createConfigHandler(config: CalendarRouteConfig): {
    GET: (request: NextRequest) => Promise<NextResponse<{
        success: boolean;
        error: string;
    }> | NextResponse<{
        success: boolean;
        data: any;
        message: string;
    }>>;
    PUT: (request: NextRequest) => Promise<NextResponse<{
        success: boolean;
        error: string;
    }> | NextResponse<{
        success: boolean;
        data: any;
        message: string;
    }>>;
};

export { type CalendarRouteConfig, createBatchDeleteEventsHandler, createConfigHandler, createCreateEventHandler, createDeleteEventHandler, createGetEventByIdHandler, createGetEventsHandler, createUpdateEventHandler };
