// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  compatibilityDate: '2025-07-15',

  devtools: { enabled: true },

  devServer: {
    port: 3000,
  },

  modules: [
    '@nuxt/content',
    '@pinia/nuxt',
    '@unocss/nuxt',
    '@vueuse/nuxt',
    '@nuxt/image',
  ],

  unocss: {
    safelist: [
      // Axis block icons (dynamic from YAML)
      'i-lucide-monitor', 'i-lucide-coins', 'i-lucide-landmark',
      'i-lucide-code-2', 'i-lucide-share-2', 'i-lucide-cloud',
      'i-lucide-scale', 'i-lucide-gavel', 'i-lucide-users',
      'i-lucide-droplets', 'i-lucide-calendar-heart',
      // Action icons
      'i-lucide-play', 'i-lucide-book-open', 'i-lucide-sparkles',
      'i-lucide-heart-handshake', 'i-lucide-arrow-up-right',
      'i-lucide-rocket', 'i-lucide-flask-conical', 'i-lucide-arrow-right',
      // Decision page
      'i-lucide-vote', 'i-lucide-scroll-text', 'i-lucide-git-branch',
      // sweethomeCloud + territoire
      'i-lucide-home', 'i-lucide-hard-drive', 'i-lucide-video',
      'i-lucide-message-circle', 'i-lucide-bot', 'i-lucide-globe-2',
      'i-lucide-map-pin', 'i-lucide-euro', 'i-lucide-package',
      'i-lucide-settings', 'i-lucide-layout-grid', 'i-lucide-server',
      'i-lucide-chevron-down', 'i-lucide-info',
    ],
  },

  app: {
    head: {
      htmlAttrs: { lang: 'fr' },
      link: [
        { rel: 'preconnect', href: 'https://fonts.bunny.net' },
        {
          rel: 'stylesheet',
          href: 'https://fonts.bunny.net/css?family=syne:400,500,600,700,800|space-grotesk:300,400,500,600,700|jetbrains-mono:400,500,700',
        },
      ],
      meta: [
        { name: 'color-scheme', content: 'dark' },
      ],
    },
    pageTransition: { name: 'page', mode: 'out-in' },
  },

  css: [
    '~/assets/css/main.css',
  ],

  runtimeConfig: {
    adminPassword: '',
    adminSecret: '',
    umamiApiKey: '',
    public: {
      siteUrl: 'https://librodrome.org',
      tenantId: 'librodrome',
      umamiUrl: '',
      umamiWebsiteId: '',
    },
  },

  nitro: {
    externals: {
      traceInclude: [
        'node_modules/pdfjs-dist/legacy/build/pdf.worker.mjs',
      ],
    },
  },

})
