import React from 'react';

// 内库使用-start
import LocaleUtil from "./../../../../../utils/LocaleUtil";
// 内库使用-end

/* 测试使用-start
import { LocaleUtil } from 'seedsui-react'
测试使用-end */

// 导航
function Navigation(_ref) {
  var map = _ref.map,
    type = _ref.type,
    longitude = _ref.longitude,
    latitude = _ref.latitude,
    name = _ref.name,
    address = _ref.address;
  if (!longitude || !latitude || typeof (map === null || map === void 0 ? void 0 : map.openLocation) !== 'function') return null;
  return /*#__PURE__*/React.createElement("span", {
    className: "map-navigation-button",
    onClick: function onClick() {
      return map.openLocation({
        map: map,
        // 终点位置
        type: type,
        longitude: longitude,
        latitude: latitude,
        name: name,
        address: address
      });
    }
  }, /*#__PURE__*/React.createElement("i", {
    className: "map-navigation-button-icon"
  }), /*#__PURE__*/React.createElement("span", {
    className: "map-navigation-button-text"
  }, LocaleUtil.locale('导航', 'SeedsUI_navigation')));
}
export default Navigation;