"use strict";

exports.__esModule = true;
exports.useTagsBulkAssignUtils = useTagsBulkAssignUtils;
var _react = require("react");
var _TagsBulkAssignUtils = require("./TagsBulkAssignUtils");
function useTagsBulkAssignUtils({
  state
}) {
  var _state$toolbar$tagsCo;
  const {
    tagsBulkAssignButtonState
  } = ((_state$toolbar$tagsCo = state.toolbar.tagsCollectionState) == null ? void 0 : _state$toolbar$tagsCo.tagsBulkAssignPopoverState) ?? {};
  const {
    hasReachedMaxSelectedItems,
    isDuringApplyChanges
  } = (0, _TagsBulkAssignUtils.getBulkAssignStatus)({
    state: state.toolbar
  });
  (0, _react.useEffect)(() => {
    if (tagsBulkAssignButtonState) {
      const tooltipContent = (0, _TagsBulkAssignUtils.getDisabledTooltipContent)({
        state: state.toolbar
      });
      tagsBulkAssignButtonState.setTooltipContent(tooltipContent);
    }
  }, [hasReachedMaxSelectedItems, isDuringApplyChanges]);
}
//# sourceMappingURL=useTagsBulkAssignUtils.js.map