import {_toNum} from "../../shared/helper";

export default () => ({
    port: _toNum(process.env.PORT) || 3000,
    newsapi: {
        key: process.env.NEWSAPIORG_API_KEY || '',
    },
    ai: {
        perplexityKey: process.env.PERPLEXITY_API_KEY || '',
        claudeKey: process.env.CLAUDE_API_KEY || '',
    },
    collector: {
        redditUserAgent: process.env.COLLECTOR_REDDIT_USER_AGENT || 'TrendHunter/1.0',
        cronIntervalHours: _toNum(process.env.COLLECTOR_CRON_INTERVAL_HOURS) || 2,
        maxItemsPerSource: _toNum(process.env.COLLECTOR_MAX_ITEMS_PER_SOURCE) || 25,
        googleTrendsGeo: process.env.GOOGLE_TRENDS_GEO || 'VN',
    },
});
