// // https://nuxt.com/docs/api/configuration/nuxt-config
// import axios from 'axios'

// const getPostRoutes = async () => {
//   const d = new Date();
//   let time = d.getTime();

//   const response = await axios.get('https://jsonplaceholder.typicode.com/todos/1');
//   console.log("nuxt config response=======", response.data.title)
//   // return the array of routes
//   return [`/products/${response.data.id}`];
// };

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  // ssr: true,
  // recaptcha: {
  //   /* reCAPTCHA options */
  //   siteKey: process.env.RECAPTCHA_SITE_KEY // for example
  // },
  // hooks: {
  //   async 'nitro:config'(nitroConfig) {
  //     // fetch the routes from our function above
  //     const slugs = await getPostRoutes();
  //     // add the routes to the nitro config
  //     nitroConfig.prerender.routes.push(...slugs);
  //   },
  // },
  // imports: {
  //   autoImport: true
  // },
  css: [
    "@/css/style.css",
    // "@/css/screen.css",
    // "@/css/swiper_slider.css",
  ],
  app: {
    head: {
      // bodyAttrs: {
      //   class: 'bg-gray-50'
      // },
      charset: 'utf-8',
      viewport: 'width=device-width, initial-scale=1',
      // title: 'meta title',
      // //   htmlAttrs: { lang: 'en' },
      // meta: [
      //   {
      //     name: "description",
      //     content: "description",
      //   },
      // ],
      link: [
        {
          rel: 'preconnect',
          href: 'https://fonts.googleapis.com'
        },
        {
          rel: 'preconnect',
          href: 'https://fonts.gstatic.com'
        },
        {
          rel: 'stylesheet',
          href: 'https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;800;900&display=swap'
        },
        {
          rel: 'stylesheet',
          integrity: "sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM",
          crossorigin: "anonymous",
          href: 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css'
        },
        {
          rel: 'stylesheet',
          href: 'https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css'
        },
        {
          rel: 'stylesheet',
          href: 'https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css'
        },
        {
          rel: 'stylesheet',
          href: 'https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css'
        },
        {
          rel: 'stylesheet',
          href: 'https://unpkg.com/aos@2.3.1/dist/aos.css'
        },
      ],
      script: [
        // {
        //   type: "text/javascript",
        //   hid: 'recaptcha',
        //   src: 'https://www.google.com/recaptcha/api.js',
        //   defer: true,
        // },
        {
          type: "text/javascript",
          hid: 'jquery',
          src: 'https://code.jquery.com/jquery-1.12.4.min.js',
          defer: true,
        },
        {
          type: "text/javascript",
          hid: 'slick-carousel',
          src: 'https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js',
          defer: true
        },
        {
          type: "text/javascript",
          hid: 'bootstrap',
          src: 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js',
          defer: true,
          integrity: "sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz",
          crossorigin: "anonymous",
        },
        {
          type: "text/javascript",
          hid: 'aos',
          src: 'https://unpkg.com/aos@2.3.1/dist/aos.js',
          defer: true
        },
        // {'src': '/js/custom.js', tagPosition: 'bodyClose'},
        // {
        //   type: "text/javascript",
        //   hid: 'custom',
        //   src: 'js/custom.js',
        //   defer: true
        // },
        //     {
        //       hid: 'gtmHead',
        //       innerHTML: `
        //         (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
        // new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
        // j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
        // 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
        // })(window,document,'script','dataLayer','GTM-*');`,
        //     },
      ],
    },
  },
  // modules: [
  //   'seo'
  // ],
  // modules: [
  //   // '@nuxtjs/recaptcha'
  //   // {
  //   //   /* reCAPTCHA options */
  //   // },
  //   // '@nuxtjs/tailwindcss'
  //   //'js/custom.js'
  // ],
  // // plugins: ['~/plugins/custom.js'],
  // plugins: [
  //   // { src: '~/plugins/recaptcha.js', mode: 'client' },
  //   { src: '~/plugins/google-recaptcha.ts', mode: 'client' },
  // ],
  // plugins: [
  //   '~/plugins/custom',
  // ],
  // components: [
  //   { path: "/components/header.vue", global: true },
  //   { path: "/components/footer.vue", global: true },
  //   { path: "/components/fixed1.vue", global: true },
  //   { path: "/components/slider1.vue", global: true },
  // ],
  // routeRules: {
  //   // Static page generated on-demand, revalidates in background (ISG)   
  //   '/a1': { swr: true },
  //   '/a2': { swr: true },
  //   // // Static page generated on-demand once (SSG - or at least mighty close)    
  //   // '/articles/**': { static: true },

  //   // // Render these routes on the client (SPA)
  //   // '/a2': { ssr: true },

  // },
  runtimeConfig: {
    apiSecret: process.env.api_key,
    public: {
      environment: process.env.environment,
      apiBase: process.env.api_base_url,
      imageBase: process.env.image_base_url,
      cdnEnabled: process.env.cdn_enabled,
      cdnBase: process.env.cdn_base_url
    },
    // recaptcha: {
    //   /* reCAPTCHA options */
    //   siteKey: "6Ld9FzwnAAAAACi-clZNwprqyQ6jmt0b_gsmoBjs" // for example
    //   // siteKey: process.env.RECAPTCHA_SITE_KEY // for example
    // }
  },
});

// module.exports = {
//   head: {
//     title: 'My App',
//     meta: [
//       { charset: 'utf-8' },
//       { name: 'viewport', content: 'width=device-width, initial-scale=1' },
//       { name: "description", content: "description111" },


//     ]
//   }
// };