import { useMemo as u } from "react";
import { useModuleSkeleton as d } from "@m4l/core";
import { useDynamicSortStore as a } from "../../store/useDynamicSortStore.js";
import { useChipsOverflow as c } from "../../../DynamicFilter/hooks/useChipsOverflow.js";
function w() {
  const t = a((e) => e.appliedSorts), r = d(), i = u(
    () => [...t].sort(
      (e, o) => e.isSet !== o.isSet ? Number(e.isSet) - Number(o.isSet) : o.id - e.id
    ),
    [t]
  ), {
    visibleFilters: s,
    overflowFilters: p,
    parentRef: l,
    containerRef: S,
    setChipRef: f,
    setMoreChipRef: n,
    setActionsRef: m
  } = c(i);
  return {
    appliedSortsSorted: i,
    visibleSorts: s,
    overflowSorts: p,
    isSkeleton: r,
    parentRef: l,
    containerRef: S,
    setChipRef: f,
    setMoreChipRef: n,
    setActionsRef: m
  };
}
export {
  w as default
};
