import t from "tiny-invariant";
const n = (e) => ({ type: "assetCounted", payload: e }), r = (e) => ({ type: "allCheckedChanged", payload: e }), d = (e) => ({ type: "searchValueChanged", payload: e }), p = (e) => ({ type: "flatItemsChanged", payload: e }), l = (e) => ({ type: "groupedItemsChanged", payload: e }), C = (e) => ({ type: "typeFilterChanged", payload: e }), h = (e) => ({
  type: "visibleTypeCountersChanged",
  payload: e
}), u = (e) => ({ type: "emptyGroupsChanged", payload: e }), o = (e, a) => {
  switch (a.type) {
    case "assetCounted":
      return { ...e, assetCounts: a.payload };
    case "allCheckedChanged":
      return { ...e, allChecked: a.payload };
    case "searchValueChanged":
      return { ...e, searchValue: a.payload, allChecked: !1 };
    case "flatItemsChanged":
      return { ...e, flatItems: a.payload };
    case "groupedItemsChanged":
      return { ...e, groupedItems: a.payload };
    case "typeFilterChanged":
      return { ...e, typeFilter: a.payload };
    case "visibleTypeCountersChanged":
      return { ...e, visibleTypeCounters: a.payload };
    case "emptyGroupsChanged":
      return { ...e, emptyGroups: a.payload };
    default:
      t(!1, "Unknown action type in tree reducer");
  }
};
export {
  r as allCheckedChanged,
  n as assetCounted,
  u as emptyGroupsChanged,
  p as flatItemsChanged,
  l as groupedItemsChanged,
  d as searchValueChanged,
  o as treeReducer,
  C as typeFilterChanged,
  h as visibleTypeCountersChanged
};
//# sourceMappingURL=treeReducer.js.map
