import { useState as t, useEffect as m } from "react";
import l from "../../../deprecated/advanced-filter/types/FilterConditionOperator.js";
import { FilterInputMode as O } from "../../../types/FilterInputMode.js";
const V = (e, o, d) => {
  const [r, s] = t(l.Equals), [i, n] = t([]), [p, u] = t("");
  m(() => {
    e === void 0 && (n([]), s(l.Equals));
  }, [e]);
  const a = e === void 0 ? i : e, c = o === void 0 ? r : o, f = a.length > 0 && c, S = d === O.CUSTOM_VALUE;
  return {
    selectedOperator: r,
    setSelectedOperator: s,
    selectedValue: i,
    setSelectedValue: n,
    searchText: p,
    setSearchText: u,
    internalValue: a,
    internalOperator: c,
    isFilterActive: f,
    isSingleMode: S
  };
};
export {
  V as default
};
//# sourceMappingURL=useDataTableFilterState.js.map
