import { jsxs as m, Fragment as p, jsx as t } from "@emotion/react/jsx-runtime";
import { useModuleDictionary as n } from "@m4l/core";
import { useMemo as s } from "react";
import { STRING_OPERATORS as f } from "../../../constants.js";
import { DYNAMIC_FILTER_DICTIONARY_ID as u, DICCTIONARY as i } from "../../../dictionary.js";
import { useDynamicFilterStore as d } from "../../../store/useDynamicFilterStore.js";
import { RHFAutocomplete as c } from "../../../../hook-form/RHFAutocomplete/RHFAutocomplete.js";
import { RHFTextField as O } from "../../../../hook-form/RHFTextField/RHFTextField.js";
function A() {
  const { getLabel: r } = n(), o = d((e) => e.popoverFilterData?.field)?.restritcOperatorsTo, l = s(
    () => f.map((e) => ({
      id: e,
      label: r(`${u}.operator_${e}`)
    })).filter((e) => o ? o.includes(e.id) : !0),
    [r, o]
  );
  return /* @__PURE__ */ m(p, { children: [
    /* @__PURE__ */ t(
      c,
      {
        type: "text",
        name: "formValueOperator",
        autoComplete: "off",
        options: l,
        getOptionLabel: (e) => e.label,
        isOptionEqualToValue: (e, a) => e.id === a.id,
        label: r(i.label_operator_string)
      }
    ),
    /* @__PURE__ */ t(
      O,
      {
        name: "formValueOperand1",
        label: r(i.label_operand1_string)
      }
    )
  ] });
}
export {
  A as StringFilter
};
