import { getI18n } from "../../../../utils/i18n";
export function enableSelectAll(total) {
  return total !== undefined;
}
export function buildSelectAllLabel(allRecordSelected, count, total) {
  const i18n = getI18n();
  if (allRecordSelected)
    return i18n('utils.selectAllPage');
  if (total === undefined)
    return i18n('utils.loadingAllRecords', { count });
  return i18n('utils.selectAllRecords', { total });
}
export function buildSelectAllTitle(total) {
  if (enableSelectAll(total))
    return '';
  const i18n = getI18n();
  return i18n('utils.waitForLoad');
}
export function getText(selectionCount, allSelectedRecords) {
  const i18n = getI18n();
  if (allSelectedRecords) {
    return i18n('utils.allRecordsSelected', { selectionCount });
  }
  const plural = selectionCount > 1 ? "s" : "";
  return i18n('utils.selectedRecords', { selectionCount, plural });
}
