import type { CapacitorConfig } from '@capacitor/cli'
import dotenv from 'dotenv'

// load environment variables from .env file
dotenv.config()

const config: CapacitorConfig = {
  appId: process.env.APP_ID,
  appName: process.env.APP_NAME,
  webDir: 'dist',
  plugins: {
    CapacitorCookies: {
      enabled: true
    },
    CapacitorHttp: {
      enabled: true
    }
  },
  server: {
    cleartext: process.env.NODE_ENV === 'development',
    androidScheme: process.env.NODE_ENV === 'development' ? 'http' : 'https'
  }
}

console.log(process.env.NODE_ENV)

export default config
