import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
import astroI18next from 'astro-i18next';

// https://astro.build/config
export default defineConfig({
  site: 'https://tiber365.it',
  integrations: [
    tailwind(),
    astroI18next({
      defaultLocale: "en",
      locales: ["en", "nl", "it"],
      i18next: {
        debug: true,
        initImmediate: false,
        supportedLngs: ["en", "nl", "it"],
        fallbackLng: "en",
        load: "all"
      },
      i18nextPlugins: { fsBackend: 'i18next-fs-backend' },
      showDefaultLocale: true,
      routes: {
        en: {
          about: 'about',
          services: 'services',
          contact: 'contact',
          privacy: 'privacy',
          terms: 'terms'
        },
        nl: {
          about: 'over-ons',
          services: 'diensten',
          contact: 'contact',
          privacy: 'privacy',
          terms: 'voorwaarden'
        },
        it: {
          about: 'chi-siamo',
          services: 'servizi',
          contact: 'contatti',
          privacy: 'privacy',
          terms: 'termini'
        }
      }
    }),
  ],
  output: 'static',
  build: {
    inlineStylesheets: 'auto',
  },
  vite: {
    optimizeDeps: {
      exclude: ['astro:content']
    }
  }
}); 