"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.drawNavigationPath = exports.createFragment = exports.clearWayfindingPath = exports.centerMapOnPoint = exports.centerMap = void 0;
exports.getRandomInt = getRandomInt;
exports.wayfindToWaypoint = exports.wayfindBetweenWaypoints = exports.styleUnitsForDestination = exports.styleShape = exports.setUserPosition = exports.setMapVenue = exports.setFollowBlueDot = void 0;
var _reactNative = require("react-native");
let MapViewManagerCommands = {
  create: 1,
  center: 2,
  setMapVenue: 3,
  centerMapOnPoint: 4,
  setFollowBlueDot: 5,
  setUserPosition: 6,
  setUserPositionXY: 7,
  clearWayfindingPath: 8,
  wayfindToWaypoint: 9,
  wayfindBetweenWaypoints: 10,
  drawNavigationPath: 11,
  styleUnitsForDestination: 12,
  styleShape: 13
};
if (_reactNative.Platform.OS == 'ios') {
  MapViewManagerCommands = {
    create: "create",
    center: "center",
    setMapVenue: "setMapVenue",
    centerMapOnPoint: "centerMapOnPoint",
    setFollowBlueDot: "setFollowBlueDot",
    setUserPosition: "setUserPosition",
    setUserPositionXY: "setUserPositionXY",
    clearWayfindingPath: "clearWayfindingPath",
    wayfindToWaypoint: "wayfindToWaypoint",
    wayfindBetweenWaypoints: "wayfindBetweenWaypoints",
    drawNavigationPath: "drawNavigationPath",
    styleUnitsForDestination: "styleUnitsForDestination",
    styleShape: "styleShape"
  };
}
const createFragment = viewId => _reactNative.UIManager.dispatchViewManagerCommand(viewId, MapViewManagerCommands.create.toString(), [viewId]);
exports.createFragment = createFragment;
const centerMap = (viewId, rotation, animationDuration) => _reactNative.UIManager.dispatchViewManagerCommand(viewId, MapViewManagerCommands.center.toString(), [rotation, animationDuration]);
exports.centerMap = centerMap;
function getRandomInt(max) {
  return Math.floor(Math.random() * max);
}
const setMapVenue = _ref => {
  let {
    viewId,
    credentials,
    compass,
    floorSelector,
    zoomButtons,
    search
  } = _ref;
  return _reactNative.UIManager.dispatchViewManagerCommand(viewId, MapViewManagerCommands.setMapVenue.toString(), [credentials, compass, floorSelector, zoomButtons, search]);
};
exports.setMapVenue = setMapVenue;
const centerMapOnPoint = (viewId, point) => _reactNative.UIManager.dispatchViewManagerCommand(viewId, MapViewManagerCommands.centerMapOnPoint.toString(), [point]);
exports.centerMapOnPoint = centerMapOnPoint;
const setFollowBlueDot = function (viewId, enabled) {
  let rotate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  let interval = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 500;
  return _reactNative.UIManager.dispatchViewManagerCommand(viewId, MapViewManagerCommands.setFollowBlueDot.toString(), [enabled, rotate, interval]);
};
exports.setFollowBlueDot = setFollowBlueDot;
const setUserPosition = (viewId, x, y, heading, format) => _reactNative.UIManager.dispatchViewManagerCommand(viewId, MapViewManagerCommands.setUserPosition.toString(), [x, y, heading, format]);
exports.setUserPosition = setUserPosition;
const clearWayfindingPath = viewId => _reactNative.UIManager.dispatchViewManagerCommand(viewId, MapViewManagerCommands.clearWayfindingPath.toString(), []);
exports.clearWayfindingPath = clearWayfindingPath;
const wayfindToWaypoint = (viewId, waypointId) => _reactNative.UIManager.dispatchViewManagerCommand(viewId, MapViewManagerCommands.wayfindToWaypoint.toString(), [waypointId]);
exports.wayfindToWaypoint = wayfindToWaypoint;
const wayfindBetweenWaypoints = (viewId, originId, destinationId) => _reactNative.UIManager.dispatchViewManagerCommand(viewId, MapViewManagerCommands.wayfindBetweenWaypoints.toString(), [originId, destinationId]);
exports.wayfindBetweenWaypoints = wayfindBetweenWaypoints;
const drawNavigationPath = (viewId, pathId, shouldFocus, style) => _reactNative.UIManager.dispatchViewManagerCommand(viewId, MapViewManagerCommands.drawNavigationPath.toString(), [pathId, shouldFocus, style]);
exports.drawNavigationPath = drawNavigationPath;
const styleUnitsForDestination = (viewId, destination, style) => _reactNative.UIManager.dispatchViewManagerCommand(viewId, MapViewManagerCommands.styleUnitsForDestination.toString(), [destination, style]);
exports.styleUnitsForDestination = styleUnitsForDestination;
const styleShape = (viewId, id, style) => _reactNative.UIManager.dispatchViewManagerCommand(viewId, MapViewManagerCommands.styleShape.toString(), [id, style]);

//   export type MAP_VIEW_REFERENCE = {
//     setMapVenue: ({
//       credentials,
//       compass,
//       floorSelector,
//       zoomButtons,
//       search,
//     }: {
//       credentials: MAP_CREDENTIALS;
//       compass?: MAP_COMPASS_PROPERTIES;
//       floorSelector?: MAP_FLOOR_SELECTOR_PROPERTIES;
//       zoomButtons?: MAP_ZOOM_BUTTON_PROPERTIES;
//       search?: MAP_SEARCH_PROPERTIES;
//     }) => void;
//     centerMapOnPoint: (point: number[]) => void;
//     setFollowBlueDot: (
//       enabled: boolean,
//       rotate?: boolean,
//       interval?: number
//     ) => void;
//     setUserPosition: (lat: number, long: number, heading: number) => void;
//     setUserPositionXY: (x: number, y: number, heading: number) => void;
//     clearWayfindingPath: () => void;
//     wayfindToWaypoint: (waypointId: number) => void;
//     wayfindBetweenWaypoints: (originId: number, destinationId: number) => void;
//     drawNavigationPath: (
//       pathId: string,
//       shouldFocus?: boolean,
//       style?: JIBESTREAM_STYLE
//     ) => void;
//     styleUnitsForDestination: (
//       destination: JIBESTREAM_DESTINATION,
//       style?: JIBESTREAM_STYLE
//     ) => void;
//     styleShape: (id: number, style?: JIBESTREAM_STYLE) => void;
//   };
exports.styleShape = styleShape;
//# sourceMappingURL=SendCommand.js.map