import tailwindcss from "@tailwindcss/vite";

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  app: {
    baseURL: "/",
    head: {
      title: "Feuerwehr",
      htmlAttrs: {
        lang: "de",
      },
      meta: [
        { charset: "utf-8" },
        { name: "viewport", content: "width=device-width, initial-scale=1" },
        { name: "format-detection", content: "telephone=no" },
      ],
      link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.png" }],
    },
  },

  ssr: true,

  css: ["~/assets/app.css", "~/assets/ConthraxSemiBold.css", "~/assets/GeneralSans.css"],

  compatibilityDate: "2024-04-03",
  devtools: { enabled: false },
  modules: ["@nuxtjs/strapi", "@nuxt/image"],

  vite: {
    plugins: [tailwindcss()],
  },

  strapi: {
    url: process.env.PUBLIC_STRAPI_URL,
    prefix: "/api",
    version: "v5",
  },

  runtimeConfig: {
    public: {
      strapi: {
        url: process.env.PUBLIC_STRAPI_URL ?? "localhost:1337",
      },
      app: {
        title: process.env.PUBLIC_APP_TITLE ?? "FF Webpage",
      },
    },
  },
});
