import { device } from "detox"

type LaunchAppOptions = {
  bundleId?: string
  newInstance?: boolean
}


export async function openUserApp() {
  await device.launchApp({
    bundleId: "com.freshyotrial.app",
    newInstance: false
  } as LaunchAppOptions)
}

export async function openStaffApp() {
  await device.launchApp({
    bundleId: "in.freshyo.adminui",
    newInstance: false
  } as LaunchAppOptions)
}

export async function launchFirst() {
  await device.launchApp({
    bundleId: "com.freshyotrial.app",
    newInstance: true
  } as LaunchAppOptions)
  await device.launchApp({
    bundleId: "in.freshyo.app",
    newInstance: true
  } as LaunchAppOptions)
}
