import React from 'react';
import getTabs from "./utils/getTabs";

// 选项卡
function Tabs(_ref) {
  var tab = _ref.tab,
    onChange = _ref.onChange;
  var tabs = getTabs();
  return /*#__PURE__*/React.createElement("div", {
    className: "map-nearbyControl-tabs"
  }, tabs.map(function (item) {
    return /*#__PURE__*/React.createElement("div", {
      key: item.name,
      className: "map-nearbyControl-tab".concat(tab.name === item.name ? ' active' : ''),
      onClick: function onClick() {
        onChange && onChange(item);
      }
    }, item.name);
  }));
}
export default Tabs;