'use strict';

var React = require('react');
var DataListContext = require('./DataListContext-cjs.js');
var DataListActions = require('./DataListActions-cjs.js');
var useResponsiveSizing = require('./useResponsiveSizing-cjs.js');

var styles = {"bulkActions":"BJxca-StHxg-","spinning":"p2-O4fMurTY-"};

const BULK_ACTIONS_CONTAINER_TEST_ID = "ATL-DataListBulkActions-Container";

// This component is meant to capture the props of the DataList.BulkActions
function DataListBulkActions(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_) {
    return null;
}
function InternalDataListBulkActions() {
    const { bulkActionsComponent } = DataListContext.useDataListContext();
    if (!bulkActionsComponent)
        return null;
    const { children } = bulkActionsComponent.props;
    const { sm } = useResponsiveSizing.useResponsiveSizing();
    // Collapse all actions under "More actions" when breakpoint is smaller than sm
    const itemsToExpose = sm ? 3 : 0;
    return (React.createElement("div", { "data-testid": BULK_ACTIONS_CONTAINER_TEST_ID, className: styles.bulkActions },
        React.createElement(DataListActions.DataListActions, { itemsToExpose: itemsToExpose }, children)));
}

exports.DataListBulkActions = DataListBulkActions;
exports.InternalDataListBulkActions = InternalDataListBulkActions;
