// API Configuration
export const BACKEND_URL = import.meta.env.PUBLIC_BACKEND_URL || 'http://localhost:3000';
export const FILES_URL = import.meta.env.PUBLIC_FILES_URL || `${BACKEND_URL}/files`;
export const MAP_URL = import.meta.env.PUBLIC_MAP_URL || 'https://maps.wplace.live/styles/liberty';

// Environment
export const ENV = import.meta.env.PUBLIC_ENV || 'dev';
export const MAINTENANCE = import.meta.env.PUBLIC_MAINTENANCE === 'true';

// Cloudflare Turnstile (optional)
export const TURNSTILE_ENABLED = import.meta.env.PUBLIC_TURNSTILE_ENABLED === 'true';
export const TURNSTILE_SITE_KEY_LOGIN = import.meta.env.PUBLIC_TURNSTILE_SITE_KEY_LOGIN || '0x4AAAAAABpHqZ-6i7uL0nmG';
export const TURNSTILE_SITE_KEY_PAINT = import.meta.env.PUBLIC_TURNSTILE_SITE_KEY_PAINT || '0x4AAAAAABpqJe8FO0N84q0F';

// Legacy aliases for backward compatibility
export const API_URL = BACKEND_URL;
export const ENABLE_TURNSTILE = TURNSTILE_ENABLED;
export const TURNSTILE_SITE_KEY = TURNSTILE_SITE_KEY_PAINT;

// OAuth providers
export const OAUTH_PROVIDERS = {
	google: {
		name: 'Google',
		icon: 'google'
	},
	twitch: {
		name: 'Twitch',
		icon: 'twitch'
	}
} as const;

// Files/Assets
export const FILES_BASE = 'files';

// Tile configuration
export const TILE_SIZE = 1000;

// Store items
export const STORE_ITEMS = {
	70: { name: '+5 Max. Charges', price: 500, type: 'charges' },
	80: { name: '+30 Paint Charges', price: 500, type: 'paint' },
	100: { name: 'Unlock Paid Colors', price: 2000, type: 'color' },
	110: { name: 'Unlock Flag', price: 20_000, type: 'flag' }
} as const;

// Report reasons
export const REPORT_REASONS = [
	{ key: 'inappropriate-content', label: 'Inappropriate Content' },
	{ key: 'hate-speech', label: 'Hate Speech' },
	{ key: 'doxxing', label: 'Doxxing' },
	{ key: 'bot', label: 'Bot' },
	{ key: 'griefing', label: 'Griefing' },
	{ key: 'other', label: 'Other' }
] as const;

// Leaderboard modes
export const LEADERBOARD_MODES = ['today', 'week', 'month', 'all-time'] as const;
export type LeaderboardMode = (typeof LEADERBOARD_MODES)[number];
