import { App } from "@tinyhttp/app";

export default function (app: App) {
	// Return site configuration
	app.get("/api/config", async (_req: any, res: any) => {
		return res.json({
			apiUrl: process.env["API_URL"] || "http://localhost:3000",
			mapUrl: process.env["MAP_URL"] || "http://localhost:3000",
			cdnUrl: process.env["CDN_URL"] || "http://localhost:3000",
			season: "2025-10",
			experiments: {
				"2025-09_pawtect": {
					variant: "disabled"
				},
				"2025-09_discord_linking": {
					enabled: false
				}
			}
		});
	});

	// Return experiment configuration
	app.get("/api/experiments", async (_req: any, res: any) => {
		return res.json({
			"2025-09_pawtect": {
				variant: "disabled"
			},
			"2025-09_discord_linking": {
				enabled: false
			}
		});
	});

	// Pawtect anti-bot system endpoint
	app.post("/api/pawtect/load", async (_req: any, res: any) => {
		// Return minimal pawtect response (disabled for now)
		return res.json({
			variant: "disabled",
			challenge: null
		});
	});
}
