import { coerceBoolean as o, normalizeFiniteNumberOrString as a, coerceFiniteNumber as c } from "../guards/guards.js";
import { normalizeIndeterminateBehavior as p, normalizeCheckboxSize as h } from "../fieldPropsNormalizers/fieldPropNormalizers.js";
import { normalizeGroups as u } from "../groupNormalization/groupNormalization.js";
import { isRecord as f } from "../../../../../isRecord.js";
const l = {
  groups: (e) => u(e.groups),
  searchable: (e) => o(e.searchable),
  multiple: (e) => o(e.multiple),
  selectAll: (e) => o(e.selectAll),
  groupable: (e) => o(e.groupable),
  expandAllGroups: (e) => o(e.expandAllGroups),
  itemRowHeight: (e) => c(e.itemRowHeight),
  groupRowHeight: (e) => c(e.groupRowHeight),
  width: (e) => a(e.width),
  checkboxSize: (e) => h(e.checkboxSize),
  showCheckboxOnGroup: (e) => o(e.showCheckboxOnGroup),
  indeterminateBehavior: (e) => p(e.indeterminateBehavior)
};
function b(e, r, i) {
  i !== void 0 && (e[r] = i);
}
function k(e) {
  if (!f(e))
    return {};
  const r = e, i = {}, s = Object.keys(l);
  for (const t of s) {
    const n = l[t];
    if (!n)
      continue;
    const m = n(r);
    b(i, t, m);
  }
  return i;
}
export {
  l as PROPERTY_NORMALIZERS,
  k as normalizeCheckableListRhfPropsWhitelist,
  b as setIfDefined
};
