import { NextRequest, NextResponse } from 'next/server';
import { LegacyAuthDbService } from '../services/index.js';
import '../schema/index.js';
import 'drizzle-orm';
import 'drizzle-orm/pg-core';
import '../../../index-DNKZ7-R_.js';

interface LegacyCookieOptions {
    name?: string;
    httpOnly?: boolean;
    secure?: boolean;
    sameSite?: 'lax' | 'strict' | 'none';
    maxAge?: number;
    path?: string;
}
interface LegacyBaseRouteConfig {
    authService: LegacyAuthDbService;
    cookieOptions?: LegacyCookieOptions;
}
interface LegacyLoginRouteConfig extends LegacyBaseRouteConfig {
}
interface LegacyRegisterRouteConfig extends LegacyBaseRouteConfig {
}
interface LegacyLogoutRouteConfig extends LegacyBaseRouteConfig {
}
interface LegacyValidateRouteConfig extends LegacyBaseRouteConfig {
}
interface LegacySendVerificationCodeConfig extends LegacyBaseRouteConfig {
}
interface LegacyResetPasswordConfig extends LegacyBaseRouteConfig {
}
interface LegacyApiResponse<T = any> {
    success: boolean;
    message?: string;
    user?: any;
    sessionToken?: string;
    valid?: boolean;
    data?: T;
}

declare function createLegacyLoginHandler(config: LegacyLoginRouteConfig): (request: NextRequest) => Promise<NextResponse<LegacyApiResponse<any>>>;

declare function createLegacyRegisterHandler(config: LegacyRegisterRouteConfig): (request: NextRequest) => Promise<NextResponse<LegacyApiResponse<any>>>;

declare function createLegacyLogoutHandler(config: LegacyLogoutRouteConfig): (request: NextRequest) => Promise<NextResponse<LegacyApiResponse<any>>>;

declare function createLegacyValidateHandler(config: LegacyValidateRouteConfig): (request: NextRequest) => Promise<NextResponse<LegacyApiResponse<any>>>;

declare function createLegacySendVerificationCodeHandler(config: LegacySendVerificationCodeConfig): (request: NextRequest) => Promise<NextResponse<LegacyApiResponse<any>>>;

declare function createLegacyResetPasswordHandler(config: LegacyResetPasswordConfig): (request: NextRequest) => Promise<NextResponse<LegacyApiResponse<any>>>;

export { type LegacyApiResponse, type LegacyCookieOptions, type LegacyLoginRouteConfig, type LegacyLogoutRouteConfig, type LegacyRegisterRouteConfig, type LegacyResetPasswordConfig, type LegacySendVerificationCodeConfig, type LegacyValidateRouteConfig, createLegacyLoginHandler, createLegacyLogoutHandler, createLegacyRegisterHandler, createLegacyResetPasswordHandler, createLegacySendVerificationCodeHandler, createLegacyValidateHandler };
