import { jsx as _jsx } from "react/jsx-runtime";
import styles from "./styles.module.scss";
import clsx from "clsx";
import { BusinessUnitViewTabs } from "../../../utils";
function BusinessUnitViewTabsComponent({ tabs = BusinessUnitViewTabs, activeTab = "Summary", onClick, dataCy, }) {
    const getClassName = (tabName, activeTab) => {
        return clsx({
            [styles.tabButton]: true,
            [styles.tabButtonSelected]: activeTab === tabName,
            [styles.tabButtonUnselected]: activeTab !== tabName,
        });
    };
    return (_jsx("div", { className: styles.businessUnitViewTabs, children: tabs.map((entity, key) => {
            return (_jsx("button", { onClick: () => onClick(entity.tabName), className: getClassName(entity.tabName, activeTab), "data-cy": `${dataCy}-${entity.tabName.toLowerCase()}`, children: entity.tabName.toUpperCase() }, key));
        }) }));
}
export default BusinessUnitViewTabsComponent;
