// packages/block-library/src/tab-panels/edit.js
import {
  useBlockProps,
  useInnerBlocksProps,
  store as blockEditorStore
} from "@wordpress/block-editor";
import { useSelect } from "@wordpress/data";
import { __ } from "@wordpress/i18n";
import AddTabToolbarControl from "../tab-panel/add-tab-toolbar-control.mjs";
import RemoveTabToolbarControl from "../tab-panel/remove-tab-toolbar-control.mjs";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
var TAB_PANELS_TEMPLATE = [
  ["core/tab-panel", { label: __("Tab") }],
  ["core/tab-panel", { label: __("Tab") }]
];
function Edit({ clientId }) {
  const blockProps = useBlockProps();
  const innerBlocksProps = useInnerBlocksProps(blockProps, {
    template: TAB_PANELS_TEMPLATE,
    templateLock: false,
    renderAppender: false
    // Appender handled by individual tab blocks
  });
  const tabsClientId = useSelect(
    (select) => select(blockEditorStore).getBlockRootClientId(clientId),
    [clientId]
  );
  return /* @__PURE__ */ jsxs(Fragment, { children: [
    /* @__PURE__ */ jsx(AddTabToolbarControl, { tabsClientId }),
    /* @__PURE__ */ jsx(RemoveTabToolbarControl, { tabsClientId }),
    /* @__PURE__ */ jsx("div", { ...innerBlocksProps })
  ] });
}
export {
  Edit as default
};
//# sourceMappingURL=edit.mjs.map
