import { useModuleDictionary as a } from "@m4l/core";
import { shallow as d } from "zustand/shallow";
import { useDynamicFilterStore as o } from "../../store/useDynamicFilterStore.js";
function F() {
  const { getLabel: n } = a(), t = o((e) => e.actions.getElementRef(), d), r = o((e) => e.isOpenPopoverMenuFields), { showPopoverFilterForAdd: i, closePopoverMenuFields: l } = o(
    (e) => e.actions
  );
  function s(e, u) {
    i(u);
  }
  function c() {
    l(!1);
  }
  function p(e) {
    return e.label ?? n(e.dictionaryId);
  }
  return {
    elementRef: t,
    isOpenPopoverMenuFields: r,
    getItemLabel: p,
    handleClosePopover: c,
    handleOpenPopUpClickItem: s
  };
}
export {
  F as default
};
