import type { ExpoConfig } from "expo/config";

const APP_ENV = (process.env.EXPO_PUBLIC_APP_ENV ?? "dev") as "dev" | "prod";

const config: ExpoConfig = {
  name: "Flowy",
  slug: "flowy",
  version: "0.1.0",
  orientation: "portrait",
  icon: "./assets/icon.png",
  scheme: "flowy",
  userInterfaceStyle: "dark",
  newArchEnabled: true,
  splash: {
    image: "./assets/icon.png",
    resizeMode: "contain",
    backgroundColor: "#000000",
  },
  ios: {
    supportsTablet: true,
    bundleIdentifier: "ai.flowylabs.llink",
    infoPlist: {
      ITSAppUsesNonExemptEncryption: false,
    },
  },
  plugins: [
    [
      "expo-build-properties",
      {
        ios: {
          deploymentTarget: "16.0",
        },
      },
    ],
    "expo-secure-store",
    [
      "expo-camera",
      {
        cameraPermission:
          "Flowy uses your camera to record video messages.",
        microphonePermission:
          "Flowy uses your microphone to record voice and video messages.",
        recordAudioAndroid: true,
      },
    ],
    [
      "expo-audio",
      {
        microphonePermission:
          "Flowy uses your microphone to record voice messages.",
      },
    ],
    [
      "expo-notifications",
      {
        icon: "./assets/icon.png",
        color: "#000000",
      },
    ],
  ],
  experiments: {
    typedRoutes: false,
  },
  extra: {
    eas: {
      projectId: "e902f7e5-e514-42bd-9591-75738e3494ed"
    },

    appEnv: APP_ENV,
  },
};

export default config;
