// https://nuxt.com/docs/api/configuration/nuxt-config

// @ts-ignore
export default defineNuxtConfig({
  compatibilityDate: '2024-04-03',
  devtools: {enabled: false},
  ssr: false,
  runtimeConfig: {
    public: {
      // @ts-ignore
      apiBaseUrl: process.env.BASE_URL || 'https://api.artjoo.com/v1',
      // @ts-ignore
      msgApiBase: process.env.MSG_BASE_URL || 'https://msg.artjoo.com/v1',
    },
  },
  app: {
    head: {
      title: 'MeYouMa',
      htmlAttrs: {
        lang: 'fa'
      },
      meta: [
        { charset: 'utf-8' },
        { name: 'viewport', content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' },
        { name: 'format-detection', content: 'telephone=no' }, // ← اضافه شد
        { httpEquiv: 'Content-Security-Policy', content: "default-src 'self'; script-src 'self'" }, // ← اضافه شد
        { hid: 'description', name: 'description', content: 'اپلیکیشن آرت ‌جو - خرید و فروش حرفه‌ای کالا و خدمات' },
        { name: 'theme-color', content: '#3BA8FF ' },

        // Open Graph (برای اشتراک‌گذاری در شبکه‌های اجتماعی)
        { hid: 'og:title', property: 'og:title', content: 'MeYouMa' },
        { hid: 'og:description', property: 'og:description', content: 'اپلیکیشن آرت ‌جو - خرید و فروش حرفه‌ای کالا و خدمات' },
        { hid: 'og:image', property: 'og:image', content: '/cover.jpg' },
        { hid: 'og:site_name', property: 'og:site_name', content: 'MeYouMa' },
        { hid: 'og:locale', property: 'og:locale', content: 'fa_IR' },
        // { hid: 'og:locale:alternate', property: 'og:locale:alternate', content: 'en_US' },
        // { hid: 'og:locale:alternate', property: 'og:locale:alternate', content: 'ar_SA' },

        // Apple
        { name: 'mobile-web-app-capable', content: 'yes' },
        { name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' }
      ],
      link: [
        { rel: 'icon', type: 'image/x-icon', href: '/favicon/favicon.ico' },
        // { rel: 'apple-touch-icon', href: '/favicon/apple-touch-icon.png' },
        { rel: 'manifest', href: '/site.webmanifest' },

        // hreflang برای سئو چندزبانه
        // { rel: 'alternate', hreflang: 'fa', href: 'https://example.com/fa' },
        // { rel: 'alternate', hreflang: 'en', href: 'https://example.com/en' },
        // { rel: 'alternate', hreflang: 'ar', href: 'https://example.com/ar' },
        // { rel: 'alternate', hreflang: 'x-default', href: 'https://example.com' }
      ]
    }
  },

  image: {
    provider: 'none'
  },

  css: [
    '~/assets/css/style.css',
    '~/assets/css/sizes.css',
    'bootstrap/dist/css/bootstrap.min.css',
    '~/assets/css/hafez-icofont.css',
    'swiper/css',
    '~/assets/scss/_variable.scss'
  ],
  plugins: [
    '~/plugins/axios.ts',
    '~/plugins/load.ts',
    '~/plugins/convertNumbers.client.ts',
    '~/plugins/bootstrap.client.ts'
  ],
  modules: ['@pinia/nuxt','@nuxt/image']
})
