export default defineNuxtConfig({
  compatibilityDate: '2026-01-01',
  devtools: { enabled: false },

  components: [
    { path: '~/components', pathPrefix: false },
  ],

  modules: [
    '@nuxtjs/google-fonts',
    '@nuxtjs/sitemap',
    '@nuxtjs/robots',
    '@nuxt/image',
    '@nuxt/eslint',
  ],

  css: ['~/assets/css/tokens.css', '~/assets/css/base.css'],

  app: {
    head: {
      htmlAttrs: { lang: 'en' },
      link: [{ rel: 'icon', type: 'image/x-icon', href: '/images/logo/favicon.ico' }],
    },
  },

  runtimeConfig: {
    smtpHost: process.env.NUXT_SMTP_HOST,
    smtpPort: Number(process.env.NUXT_SMTP_PORT || 587),
    smtpSecure: process.env.NUXT_SMTP_SECURE === 'false' ? 'false' : 'true',
    smtpUser: process.env.NUXT_SMTP_USER,
    smtpPass: process.env.NUXT_SMTP_PASS,
    smtpAllowInsecureTls: process.env.NUXT_SMTP_ALLOW_INSECURE_TLS === 'false' ? 'false' : 'true',
    contactFromEmail: process.env.NUXT_CONTACT_FROM_EMAIL,
    contactBccEmail: process.env.NUXT_CONTACT_BCC_EMAIL,
  },

  site: {
    url: 'https://dleag.org',
    name: 'DLEAG',
  },

  sitemap: {
    sources: ['/api/__sitemap__/urls'],
  },

  googleFonts: {
    families: {
      'Barlow Condensed': [400, 500, 600, 700],
      'Manrope': [400, 500, 600, 700, 800],
      'Roboto': [400, 500, 600, 700],
      'IBM Plex Mono': [400, 500, 600],
    },
    display: 'swap',
    download: true,
    inject: true,
    preload: true,
  },

  routeRules: {
    '/': { prerender: true },
  },

  typescript: { strict: true },
})
