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AAA,EAY/C,EAAkB,UAAA,mBAAA,SAA8B,EAAA,GAAA,OAAA,EAAA,KAAA,sBAAA,MAAA,GAAA,UAAA,EAShD,EAAU,UAAA,WAAA,SAA+B,EAAiC,GAAA,OAAA,EAAA,KAAA,cAAA,MAAA,GAAA,UAAA,E,sBA7H1E,EAAY,UAAA,gB,yWAlTd,C,EAwRqC,W","file":"/npm/@ionic-native/launch-navigator@5.36.0/index.js/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.\n * Original file: /npm/@ionic-native/launch-navigator@5.36.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { Injectable } from '@angular/core';\nimport { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';\n\nexport interface PromptsOptions {\n  /**\n   * a function to pass the user's decision whether to remember their choice of app.\n   * This will be passed a single boolean value indicating the user's decision.\n   * @param rememberChoice\n   */\n  callback?: (rememberChoice: boolean) => void;\n\n  /**\n   * text to display in the native prompt header asking user whether to remember their choice.\n   * Defaults to \"Remember your choice?\" if not specified.\n   */\n  headerText?: string;\n\n  /**\n   * text to display in the native prompt body asking user whether to remember their choice.\n   * Defaults to \"Use the same app for navigating next time?\" if not specified.\n   */\n  bodyText?: string;\n\n  /**\n   * text to display for the Yes button.\n   * Defaults to \"Yes\" if not specified.\n   */\n  yesButtonText?: string;\n\n  /**\n   * text to display for the No button.\n   * Defaults to \"No\" if not specified.\n   */\n  noButtonText?: string;\n}\n\nexport interface RememberChoiceOptions {\n  /**\n   * whether to remember user choice of app for next time, instead of asking again for user choice.\n   * `\"prompt\"` - Prompt user to decide whether to remember choice.\n   *  - Default value if unspecified.\n   *  - If `promptFn` is defined, this will be used for user confirmation.\n   *  - Otherwise (by default), a native dialog will be displayed to ask user.\n   * `false` - Do not remember user choice.\n   * `true` - Remember user choice.\n   */\n  enabled?: boolean | string;\n\n  /**\n   * a function which asks the user whether to remember their choice of app.\n   * If this is defined, then the default dialog prompt will not be shown, allowing for a custom UI for asking the user.\n   * This will be passed a callback function which should be invoked with a single boolean argument which indicates the user's decision to remember their choice.\n   * @param callback\n   */\n  promptFn?: (callback: (rememberChoice: boolean) => void) => void;\n\n  /**\n   * options related to the default dialog prompt used to ask the user whether to remember their choice of app.\n   */\n  prompt?: PromptsOptions;\n}\n\nexport interface AppSelectionOptions {\n  /**\n   * text to display in the native picker which enables user to select which navigation app to launch.\n   * Defaults to \"Select app for navigation\" if not specified.\n   */\n  dialogHeaderText?: string;\n\n  /**\n   * text to display for the cancel button in the native picker which enables user to select which navigation app to launch.\n   * Defaults to \"Cancel\" if not specified.\n   */\n  cancelButtonText?: string;\n\n  /**\n   * List of apps, defined as `launchnavigator.APP` constants, which should be displayed in the picker if the app is available.\n   * This can be used to restrict which apps are displayed, even if they are installed.\n   * By default, all available apps will be displayed.\n   */\n  list?: string[];\n\n  /**\n   * Callback to invoke when the user selects an app in the native picker.\n   * A single string argument is passed which is the app what was selected defined as a `launchnavigator.APP` constant.\n   */\n  callback?: (app: string) => void;\n\n  /**\n   * (Android only) native picker theme. Specify using `actionsheet.ANDROID_THEMES` constants.\n   * Default `actionsheet.ANDROID_THEMES.THEME_HOLO_LIGHT`\n   */\n  androidTheme?: number;\n\n  /**\n   * options related to whether to remember user choice of app for next time, instead of asking again for user choice.\n   */\n  rememberChoice?: RememberChoiceOptions;\n}\n\nexport interface LaunchNavigatorOptions {\n  /**\n   * A callback to invoke when the navigation app is successfully launched.\n   */\n  successCallback?: Function;\n\n  /**\n   * A callback to invoke if an error is encountered while launching the app.\n   * A single string argument containing the error message will be passed in.\n   */\n  errorCallback?: (error: string) => void;\n\n  /**\n   * name of the navigation app to use for directions.\n   * Specify using launchnavigator.APP constants.\n   * e.g. `launchnavigator.APP.GOOGLE_MAPS`.\n   * If not specified, defaults to User Selection.\n   */\n  app?: string;\n\n  /**\n   * nickname to display in app for destination. e.g. \"Bob's House\".\n   */\n  destinationName?: string;\n\n  /**\n   * Start point of the navigation.\n   * If not specified, the current device location will be used.\n   * Either:\n   *  - a {string} containing the address. e.g. \"Buckingham Palace, London\"\n   *  - a {string} containing a latitude/longitude coordinate. e.g. \"50.1. -4.0\"\n   *  - an {array}, where the first element is the latitude and the second element is a longitude, as decimal numbers. e.g. [50.1, -4.0]\n   */\n  start?: string | number[];\n\n  /**\n   * nickname to display in app for start . e.g. \"My House\".\n   */\n  startName?: string;\n\n  /**\n   * Transportation mode for navigation: \"driving\", \"walking\" or \"transit\". Defaults to \"driving\" if not specified.\n   */\n  transportMode?: string;\n\n  /**\n   * If true, debug log output will be generated by the plugin. Defaults to false.\n   */\n  enableDebug?: boolean;\n\n  /**\n   * a key/value map of extra app-specific parameters. For example, to tell Google Maps on Android to display Satellite view in \"maps\" launch mode: `{\"t\": \"k\"}`\n   */\n  extras?: any;\n\n  /**\n   * (Android only) mode in which to open Google Maps app.\n   * `launchnavigator.LAUNCH_MODE.MAPS` or `launchnavigator.LAUNCH_MODE.TURN_BY_TURN`\n   * Defaults to `launchnavigator.LAUNCH_MODE.MAPS` if not specified.\n   */\n  launchModeGoogleMaps?: string;\n\n  /**\n   * (iOS only) method to use to open Apple Maps app.\n   * `launchnavigator.LAUNCH_MODE.URI_SCHEME` or `launchnavigator.LAUNCH_MODE.MAPKIT`\n   * Defaults to `launchnavigator.LAUNCH_MODE.URI_SCHEME` if not specified.\n   */\n  launchModeAppleMaps?: string;\n\n  /**\n   * (Windows only) If false, the plugin will NOT attempt to use the geolocation plugin to determine the current device position when the start location parameter is omitted. Defaults to true.\n   */\n  enableGeolocation?: boolean;\n\n  /**\n   * (Android and iOS only) If true, and input location type(s) doesn't match those required by the app, use geocoding to obtain the address/coords as required. Defaults to true.\n   */\n  enableGeocoding?: boolean;\n\n  /**\n   * options related to the default native actionsheet picker which enables user to select which navigation app to launch if `app` is not specified.\n   */\n  appSelection?: AppSelectionOptions;\n}\n\nexport interface UserChoice {\n  /**\n   * Indicates whether a user choice exists for a preferred navigator app.\n   * @param callback - function to pass result to: will receive a boolean argument.\n   */\n  exists: (callback: (exists: boolean) => void) => void;\n\n  /**\n   * Returns current user choice of preferred navigator app.\n   * @param callback - function to pass result to: will receive a string argument indicating the app, which is a constant in `launchnavigator.APP`.\n   */\n  get: (callback: (app: string) => void) => void;\n\n  /**\n   * Sets the current user choice of preferred navigator app.\n   * @param app - app to set as preferred choice as a constant in `launchnavigator.APP`.\n   * @param callback - function to call once operation is complete.\n   */\n  set: (app: string, callback: () => void) => void;\n\n  /**\n   * Clears the current user choice of preferred navigator app.\n   * @param callback - function to call once operation is complete.\n   */\n  clear: (callback: () => void) => void;\n}\n\nexport interface UserPrompted {\n  /**\n   * Indicates whether user has already been prompted whether to remember their choice a preferred navigator app.\n   * @param callback - function to pass result to: will receive a boolean argument.\n   */\n  get: (callback: (exists: boolean) => void) => void;\n\n  /**\n   * Sets flag indicating user has already been prompted whether to remember their choice a preferred navigator app.\n   * @param callback - function to call once operation is complete.\n   */\n  set: (callback: () => void) => void;\n\n  /**\n   * Clears flag which indicates if user has already been prompted whether to remember their choice a preferred navigator app.\n   * @param callback - function to call once operation is complete.\n   */\n  clear: (callback: () => void) => void;\n}\n\nexport interface AppSelection {\n  userChoice: UserChoice;\n  userPrompted: UserPrompted;\n}\n\n/**\n * @name Launch Navigator\n * @description\n * Requires Cordova plugin: uk.co.workingedge.phonegap.plugin.launchnavigator. For more info, please see the [LaunchNavigator plugin docs](https://github.com/dpa99c/phonegap-launch-navigator).\n *\n * @usage\n * Please refer to the plugin's repo for detailed usage. This docs page only explains the Native wrapper.\n *\n * ```typescript\n * import { LaunchNavigator, LaunchNavigatorOptions } from '@ionic-native/launch-navigator/ngx';\n *\n * constructor(private launchNavigator: LaunchNavigator) { }\n *\n * ...\n *\n * let options: LaunchNavigatorOptions = {\n *   start: 'London, ON',\n *   app: LaunchNavigator.APPS.UBER\n * }\n *\n * this.launchNavigator.navigate('Toronto, ON', options)\n *   .then(\n *     success => console.log('Launched navigator'),\n *     error => console.log('Error launching navigator', error)\n *   );\n * ```\n * @interfaces\n * LaunchNavigatorOptions\n * PromptsOptions\n * RememberChoiceOptions\n * AppSelectionOptions\n * UserChoice\n * UserPrompted\n * AppSelection\n */\n@Plugin({\n  pluginName: 'LaunchNavigator',\n  plugin: 'uk.co.workingedge.phonegap.plugin.launchnavigator',\n  pluginRef: 'launchnavigator',\n  repo: 'https://github.com/dpa99c/phonegap-launch-navigator',\n  platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8'],\n})\n@Injectable()\nexport class LaunchNavigator extends IonicNativePlugin {\n  APP: any = {\n    USER_SELECT: 'user_select',\n    APPLE_MAPS: 'apple_maps',\n    GOOGLE_MAPS: 'google_maps',\n    WAZE: 'waze',\n    CITYMAPPER: 'citymapper',\n    NAVIGON: 'navigon',\n    TRANSIT_APP: 'transit_app',\n    YANDEX: 'yandex',\n    UBER: 'uber',\n    TOMTOM: 'tomtom',\n    BING_MAPS: 'bing_maps',\n    SYGIC: 'sygic',\n    HERE_MAPS: 'here_maps',\n    MOOVIT: 'moovit',\n  };\n\n  TRANSPORT_MODE: any = {\n    DRIVING: 'driving',\n    WALKING: 'walking',\n    BICYCLING: 'bicycling',\n    TRANSIT: 'transit',\n  };\n\n  @CordovaProperty()\n  appSelection: AppSelection;\n\n  /**\n   * Launches navigator app\n   * @param destination {string|number[]} Location name or coordinates (as string or array)\n   * @param options {LaunchNavigatorOptions}\n   * @returns {Promise<any>}\n   */\n  @Cordova({\n    successIndex: 2,\n    errorIndex: 3,\n  })\n  navigate(destination: string | number[], options?: LaunchNavigatorOptions): Promise<any> {\n    return;\n  }\n\n  /**\n   * Determines if the given app is installed and available on the current device.\n   * @param app {string}\n   * @returns {Promise<any>}\n   */\n  @Cordova()\n  isAppAvailable(app: string): Promise<any> {\n    return;\n  }\n\n  /**\n   * Returns a list indicating which apps are installed and available on the current device.\n   * @returns {Promise<string[]>}\n   */\n  @Cordova()\n  availableApps(): Promise<string[]> {\n    return;\n  }\n\n  /**\n   * Returns the display name of the specified app.\n   * @param app {string}\n   * @returns {string}\n   */\n  @Cordova({ sync: true })\n  getAppDisplayName(app: string): string {\n    return;\n  }\n\n  /**\n   * Returns list of supported apps on a given platform.\n   * @param platform {string}\n   * @returns {string[]}\n   */\n  @Cordova({ sync: true })\n  getAppsForPlatform(platform: string): string[] {\n    return;\n  }\n\n  /**\n   * Indicates if an app on a given platform supports specification of transport mode.\n   * @param app {string} specified as a string, you can use one of the constants, e.g `LaunchNavigator.APP.GOOGLE_MAPS`\n   * @param platform {string}\n   * @returns {boolean}\n   */\n  @Cordova({ sync: true })\n  supportsTransportMode(app: string, platform: string): boolean {\n    return;\n  }\n\n  /**\n   * Returns the list of transport modes supported by an app on a given platform.\n   * @param app {string}\n   * @param platform {string}\n   * @returns {string[]}\n   */\n  @Cordova({ sync: true })\n  getTransportModes(app: string, platform: string): string[] {\n    return;\n  }\n\n  /**\n   * @param app {string}\n   * @param platform {string}\n   * @returns {boolean}\n   */\n  @Cordova({ sync: true })\n  supportsDestName(app: string, platform: string): boolean {\n    return;\n  }\n\n  /**\n   * Indicates if an app on a given platform supports specification of start location.\n   * @param app {string}\n   * @param platform {string}\n   * @returns {boolean}\n   */\n  @Cordova({ sync: true })\n  supportsStart(app: string, platform: string): boolean {\n    return;\n  }\n\n  /**\n   * @param app {string}\n   * @param platform {string}\n   * @returns {boolean}\n   */\n  @Cordova({ sync: true })\n  supportsStartName(app: string, platform: string): boolean {\n    return;\n  }\n\n  /**\n   * Indicates if an app on a given platform supports specification of launch mode.\n   * Note that currently only Google Maps on Android does.\n   * @param app {string}\n   * @param platform {string}\n   * @returns {boolean}\n   */\n  @Cordova({ sync: true })\n  supportsLaunchMode(app: string, platform: string): boolean {\n    return;\n  }\n\n  /**\n   * @param destination {string | number[]}\n   * @param options {LaunchNavigatorOptions}\n   */\n  @Cordova({ sync: true })\n  userSelect(destination: string | number[], options: LaunchNavigatorOptions): void {}\n}\n"]}