"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// packages/block-editor/src/components/tabbed-sidebar/index.js
var tabbed_sidebar_exports = {};
__export(tabbed_sidebar_exports, {
  default: () => tabbed_sidebar_default
});
module.exports = __toCommonJS(tabbed_sidebar_exports);
var import_components = require("@wordpress/components");
var import_element = require("@wordpress/element");
var import_icons = require("@wordpress/icons");
var import_lock_unlock = require("../../lock-unlock");
var import_jsx_runtime = require("react/jsx-runtime");
var { Tabs } = (0, import_lock_unlock.unlock)(import_components.privateApis);
function TabbedSidebar({ defaultTabId, onClose, onSelect, selectedTab, tabs, closeButtonLabel }, ref) {
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "block-editor-tabbed-sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
    Tabs,
    {
      selectOnMove: false,
      defaultTabId,
      onSelect,
      selectedTabId: selectedTab,
      children: [
        /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "block-editor-tabbed-sidebar__tablist-and-close-button", children: [
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
            import_components.Button,
            {
              className: "block-editor-tabbed-sidebar__close-button",
              icon: import_icons.closeSmall,
              label: closeButtonLabel,
              onClick: () => onClose(),
              size: "compact"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
            Tabs.TabList,
            {
              className: "block-editor-tabbed-sidebar__tablist",
              ref,
              children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
                Tabs.Tab,
                {
                  tabId: tab.name,
                  className: "block-editor-tabbed-sidebar__tab",
                  children: tab.title
                },
                tab.name
              ))
            }
          )
        ] }),
        tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
          Tabs.TabPanel,
          {
            tabId: tab.name,
            focusable: false,
            className: "block-editor-tabbed-sidebar__tabpanel",
            ref: tab.panelRef,
            children: tab.panel
          },
          tab.name
        ))
      ]
    }
  ) });
}
var tabbed_sidebar_default = (0, import_element.forwardRef)(TabbedSidebar);
//# sourceMappingURL=index.js.map
