var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

import React, { useContext } from 'react';
import Context from './../../Context/instance.js';

function Location(_ref) {
  var props = _objectWithoutProperties(_ref, []);

  // context
  var context = useContext(Context) || {};
  var locale = context.locale || function (key) {
    return key || '';
  };
  return React.createElement(
    'div',
    _extends({}, props, { className: 'map-location' + (props.className ? ' ' + props.className : '') }),
    React.createElement('div', { className: 'map-location-icon' }),
    React.createElement(
      'div',
      { className: 'map-location-label' },
      locale('重新定位', 'reposition')
    )
  );
}

export default Location;