"use strict";

exports.__esModule = true;
exports.useDateRangeFilterState = useDateRangeFilterState;
var _react = require("react");
var _state = require("../state");
var _react2 = require("@wix/bex-core/react");
var _providers = require("../providers");
function useDateRangeFilterState(params) {
  const {
    filter,
    filterByTime,
    mode
  } = params;
  const {
    translate
  } = (0, _react2.useWixPatternsContainer)();
  const toolbar = (0, _providers.useFilterToolbarState)();
  const [state] = (0, _react.useState)(() => new _state.DateRangeFilterState({
    translate,
    filter,
    toolbar,
    filterByTime,
    mode
  }));
  return state;
}
//# sourceMappingURL=useDateRangeFilterState.js.map