import React from 'react';
import classNames from 'classnames';
import { AccordionTab } from './accordion-tab';
import { jsx as _jsx } from "react/jsx-runtime";
/** Tabs component to be positioned bellow expanded accordion row */
export const AccordionTabs = ({
  tabs,
  selectedTabKey,
  className,
  testId,
  isSeparatePageTab = false,
  onSelect,
  onSelectSubOptions = () => {},
  NavLink
}) => {
  if (!tabs || !tabs.length) {
    return null;
  }
  return /*#__PURE__*/_jsx("div", {
    className: classNames('accordion-tabs', className, isSeparatePageTab && 'separate-page-tabs'),
    "test-id": testId,
    children: tabs.map((tab, i) => /*#__PURE__*/_jsx(AccordionTab, {
      tab: tab,
      index: i,
      selectedTabKey: selectedTabKey,
      onSelect: (selectedTab, index) => onSelect?.(selectedTab, index),
      onSelectSubOptions: onSelectSubOptions,
      NavLink: NavLink
    }, tab.key))
  });
};