export default defineNuxtConfig({
  modules: ['@nuxtjs/tailwindcss', '@pinia/nuxt'],

  runtimeConfig: {
    public: {
      leagueId: 'pd',
      leagueName: 'Paper Dynasty',
      apiUrl: process.env.NUXT_PUBLIC_API_URL || 'http://localhost:8000',
      wsUrl: process.env.NUXT_PUBLIC_WS_URL || 'http://localhost:8000',
      discordClientId: process.env.NUXT_PUBLIC_DISCORD_CLIENT_ID || '',
      discordRedirectUri: process.env.NUXT_PUBLIC_DISCORD_REDIRECT_URI || 'http://localhost:3001/auth/callback',
    }
  },

  compatibilityDate: '2025-07-15',

  devtools: { enabled: true },

  // Vite config for external hostname access
  // Configure NUXT_ALLOWED_HOSTS env var for your domains (comma-separated)
  vite: {
    server: {
      allowedHosts: process.env.NUXT_ALLOWED_HOSTS?.split(',') || ['localhost', '127.0.0.1']
    }
  },

  typescript: {
    strict: true,
    typeCheck: true
  }
})
