import React from 'react';
import { testEditableOptions } from "./utils";
function Tabs(_ref) {
  var tabs = _ref.tabs,
    activeTab = _ref.activeTab,
    onActiveTab = _ref.onActiveTab,
    editableOptions = _ref.editableOptions;
  return /*#__PURE__*/React.createElement("div", {
    className: "cascader-tabs"
  }, Array.isArray(tabs) && tabs.length ? tabs.map(function (tab, index) {
    return /*#__PURE__*/React.createElement("div", {
      onClick: function onClick(e) {
        e.stopPropagation();
        onActiveTab && onActiveTab(tab);
      },
      className: "cascader-tab".concat((tab === null || tab === void 0 ? void 0 : tab.id) === (activeTab === null || activeTab === void 0 ? void 0 : activeTab.id) ? ' active' : '').concat(testEditableOptions(tab, {
        editableOptions: editableOptions
      }) ? '' : ' disabled'),
      key: index
    }, tab.name || 'No name');
  }) : null);
}
export default Tabs;