import u from "../../../@babel/runtime/helpers/esm/extends.mjs";
import n from "../../../@babel/runtime/helpers/esm/objectSpread2.mjs";
import s from "../../../@babel/runtime/helpers/esm/objectWithoutProperties.mjs";
import * as r from "react";
import b from "./index.mjs";
import v from "../TabContext.mjs";
import T from "../TabPanelList/TabPane.mjs";
var f = ["renderTabBar"], x = ["label", "key"], N = function(a) {
  var t = a.renderTabBar, o = s(a, f), i = r.useContext(v), m = i.tabs;
  if (t) {
    var c = n(n({}, o), {}, {
      // Legacy support. We do not use this actually
      panes: m.map(function(e) {
        var d = e.label, p = e.key, l = s(e, x);
        return /* @__PURE__ */ r.createElement(T, u({
          tab: d,
          key: p,
          tabKey: p
        }, l));
      })
    });
    return t(c, b);
  }
  return /* @__PURE__ */ r.createElement(b, o);
};
process.env.NODE_ENV !== "production" && (N.displayName = "TabNavListWrapper");
export {
  N as default
};
