// App constants
export const STORAGE_KEY = 'claudash';
export const DEBUG = import.meta.env.REACT_APP_DEBUG_MODE === 'true';

/**
 * Debug-gated console.log — only outputs when DEBUG mode is enabled
 */
export function debugLog(...args) {
  if (DEBUG) console.log(...args);
}

/**
 * Debug-gated console.warn — only outputs when DEBUG mode is enabled
 */
export function debugWarn(...args) {
  if (DEBUG) console.warn(...args);
}

export const DEFAULT_REFRESH_INTERVAL = 15; // minutes
export const DEFAULT_HISTORY_DAYS = 7;
export const DEFAULT_CLAUDE_MODEL = 'claude-sonnet-4-5-20250929';
export const DEFAULT_CORS_PROXY = 'https://api.allorigins.win/raw?url=';
export const DEFAULT_TEMPERATURE_UNIT = 'F'; // 'F' for Fahrenheit, 'C' for Celsius

// Cache TTL in minutes
export const CACHE_TTL = 15;

// Date format
export const DATE_FORMAT = 'YYYY-MM-DD';

// API endpoints
export const ANTHROPIC_API_URL = 'https://api.anthropic.com/v1/messages';
export const RSS_TO_JSON_API = 'https://api.rss2json.com/v1/api.json';

// Default data sources (fallback if none provided)
export const DEFAULT_DATA_SOURCES = [
  'https://www.reddit.com/r/technology.json',
  'https://www.reddit.com/r/worldnews.json'
];

// Weather API
export const WEATHER_API_BASE = 'https://wttr.in';

// Max tokens for Claude responses
export const MAX_TOKENS = 1024;