import { json } from '@sveltejs/kit';
import { AuthConfigManager } from '$lib/auth/backend';

export async function GET() {
  try {
    const config = AuthConfigManager.getFrontendConfig();
    return json(config);
  } catch (error) {
    return json(
      { error: 'Failed to get config', message: error instanceof Error ? error.message : 'Unknown error' },
      { status: 500 }
    );
  }
}
