import { useMemo as T, useCallback as r } from "react";
import { STRING_OPERATORS as A, BOOLEAN_OPERATORS as f, DATE_OPERATORS as s, COMPARABLE_OPERATORS as B } from "../../../constants/index.js";
import { FilterValueType as p } from "../../../types/FilterValueType.js";
import { operatorTextObject as E, operatorShortcutObject as N } from "../../../deprecated/advanced-filter/types/FilterConditionOperator.js";
import y from "../../../../jtl-dropdown/types/DropdownItem.js";
const L = (c, m = p.STRING, o) => {
  const n = T(() => ({
    [p.NUMBER]: B,
    [p.DATE]: s,
    [p.BOOLEAN]: f,
    [p.STRING]: A
  })[m] || A, [m]), R = r(
    (t) => ({
      label: (o == null ? void 0 : o[t]) ?? E[t],
      value: t
    }),
    [o]
  ), O = T(() => n.map(R), [n, R]), u = r(
    (t) => ({
      type: y.Default,
      shortcut: N[t],
      label: (o == null ? void 0 : o[t]) ?? E[t],
      onClick: () => c(t)
    }),
    [c, o]
  ), S = r(() => n.map(u), [u, n]);
  return { renderOperator: u, getOperatorOptions: S, operatorOptions: O };
};
export {
  L as default
};
//# sourceMappingURL=useFilterOperatorOptions.js.map
