import { constants } from "./public/const/index";
import { createMyRouter } from "./router.js";
var boostrapCss = "/css/bootstrap.min.css";

export default defineNuxtConfig({
  css: ["@/assets/scss/app.scss"],
  ssr: false,
  app: {
    head: { 
      htmlAttrs: {
        lang: 'en',  // This sets the lang attribute for the <html> tag
      },
      meta: [
        {
          charset: "utf-8",
        },
        {
          name: "viewport",
          content: "width=device-width, initial-scale=1",
        },
        {
          hid: "description",
          name: "description",
          content:
            "TXParts Enterprise LLC is leading brand that provides all kinds of cell phone repair parts at amazingly low prices.",
        },
        {
          name: "format-detection",
          content: "telephone=no",
        },
      ],
      script: [
        { 
          src: "https://www.googletagmanager.com/gtag/js?id=AW-16957038804",
          async: true
        },
        {
          children: `
            window.dataLayer = window.dataLayer || [];
            function gtag(){dataLayer.push(arguments);}
            gtag('js', new Date());
            gtag('config', 'AW-16957038804');
          `
        },
        { 
          src: "https://www.googletagmanager.com/gtag/js?id=G-PYZQRQS1SM",
          async: true
        },
        {
          children: `
             window.dataLayer = window.dataLayer || [];
            function gtag(){dataLayer.push(arguments);}
            gtag('js', new Date());
            gtag('config', 'G-PYZQRQS1SM');
          `
        },
        // {
        //   src: "https://checkout.stripe.com/checkout.js",
        // },
        { src: 'https://www.paypal.com/sdk/js?client-id=test&currency=USD' },
        // {
        //   src: "https://cdn.scaleflex.it/plugins/js-cloudimage-360-view/3.0.3/js-cloudimage-360-view.min.js",
        // },
      ],
      link: [
        {
          rel: "icon",
          type: "image/x-icon",
          href: "/favicon.png",
        },

        {
          rel: "preconnect",
          href: "https://fonts.googleapis.com",
        },
        {
          rel: "preconnect",
          href: "https://fonts.gstatic.com",
        },
        {
          rel: "preconnect",
          href: "https://fonts.gstatic.com",
        },
        // {
        //   rel: "stylesheet",
        //   href: "https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap",
        // },

        {
          rel: "stylesheet",
          id: "bootstrap-link",
          href: boostrapCss,
        },
      ],
    },
  },
  alias: {
    pinia: "/node_modules/@pinia/nuxt/node_modules/pinia/dist/pinia.mjs"
  },
  modules: [
    "@nuxtjs/i18n",
    [
      "@pinia/nuxt",
      {
        autoImports: ["defineStore", "acceptHMRUpdate"],
      },
    ],
  ],
  i18n: {
    strategy: "prefix_except_default",
    defaultLocale: "en",
    locales: [
      {
        code: "en",
        name: "English",
      },
      {
        code: "es",
        name: "Español",
      },
      {
        code: "fr",
        name: "Français",
      },
    ],
    vueI18n: "./i18n.config.ts"
  },
  plugins: [
    { src: "~/plugins/plugins.js", mode: "client" },
  ],
  runtimeConfig: {
    public: {
      const: constants,
    },
  },
  target: 'static',
});
