/* @oracle/oraclejet-preact: undefined */
'use strict';

var jsxRuntime = require('preact/jsx-runtime');
var HiddenAccessible = require('./HiddenAccessible-087eb49a.js');
var LiveRegion = require('./LiveRegion-62ce9ac7.js');
require('preact/hooks');
require('./LayerHost-3cd73603.js');
var compat = require('preact/compat');
require('./UNSAFE_Text/themes/TextStyles.css.js');
require('./Flex-3a257bc3.js');
var TabBarLayout = require('./TabBarLayout-ca8af14b.js');
require('./flexitem-fee13e26.js');
require('./dimensions-6101ca1f.js');
require('./boxalignment-e287d370.js');
require('./logger-2b636482.js');


require('./UNSAFE_TabBarCommon/themes/redwood/TabBarItemVariants.css.js');


require('./UNSAFE_Badge/themes/redwood/BadgeVariants.css.js');
require('./ConveyorBeltContext-bfe84b44.js');
require('./BusyStateContext-86f40d3c.js');
require('./TabbableModeContext-e99d527e.js');
require('preact');


require('./hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css.js');
require('./tooltipUtils-2bc15136.js');

require('./BaseButton-d8f96bfa.js');
require('./ButtonLabelLayout-c876923f.js');
require('./NavigationList-d0d74565.js');
require('./useNavigationListItem-b97e76d5.js');
require('./UNSAFE_NavigationList/themes/NavigationListItemStyles.css.js');

require('./UNSAFE_NavigationList/themes/redwood/NavigationListItemVariants.css.js');

require('./Floating-79cbe5ad.js');

require('./keyboardUtils-b42fe7d5.js');
require('./tabbableUtils-22a50472.js');
require('./CollectionInteractionContext-f84ff7a1.js');

require('./Sheet-1d6e8cf8.js');

require('./StyledCheckbox-9047ed7d.js');

var UNSAFE_TabBar_themes_TabBarStyles_css = require('./UNSAFE_TabBar/themes/TabBarStyles.css.js');
var useTabBar = require('./useTabBar-35b73d10.js');
var TabBarContextMenu = require('./TabBarContextMenu-d9bf65c2.js');

/**
 * A tab bar allows navigation between different content sections.
 */
const TabBar = compat.forwardRef(({ children, layout = 'stretch', display = 'standard', size = 'md', edge = 'top', selection, onSelect, onRemove, 'aria-describedby': ariaDescribedBy, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, contextMenuConfig }, ref) => {
    const rootRef = ref;
    const { rootProps, tabBarContext, menuProps, contextMenuContext, contextMenuDescription, contextMenuDescriptionId, accStatusInfo } = useTabBar.useTabBar({
        class: UNSAFE_TabBar_themes_TabBarStyles_css.styles.tabBarBase,
        edge: edge,
        onRemove,
        onSelect,
        ref: rootRef,
        selection,
        size,
        children,
        contextMenuConfig
    });
    const isContextMenuAvailable = contextMenuConfig != null;
    return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TabBarLayout.TabBarContext.Provider, { value: tabBarContext, children: jsxRuntime.jsx("div", { ...rootProps, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-haspopup": contextMenuConfig != null ? true : false, "aria-describedby": isContextMenuAvailable && contextMenuDescriptionId
                        ? ariaDescribedBy
                            ? `${ariaDescribedBy} ${contextMenuDescriptionId}`
                            : contextMenuDescriptionId
                        : ariaDescribedBy, children: jsxRuntime.jsx(TabBarLayout.TabBarLayout, { layout: layout, display: display, children: children }) }) }), isContextMenuAvailable && contextMenuDescriptionId && (jsxRuntime.jsx("span", { id: contextMenuDescriptionId, children: jsxRuntime.jsx(HiddenAccessible.HiddenAccessible, { children: contextMenuDescription }) })), isContextMenuAvailable && accStatusInfo && jsxRuntime.jsx(LiveRegion.LiveRegion, { children: accStatusInfo }), isContextMenuAvailable && (jsxRuntime.jsx(TabBarContextMenu.TabBarContextMenu, { ...menuProps, contextMenuConfig: contextMenuConfig, contextMenuContext: contextMenuContext }))] }));
});

exports.TabBar = TabBar;
//# sourceMappingURL=TabBar-d84e222e.js.map
