import { useState } from 'react';
import { DateRangeFilterState } from '../state';
import { useWixPatternsContainer } from '@wix/bex-core/react';
import { useFilterToolbarState } from '../providers';
export function useDateRangeFilterState(params) {
    const { filter, filterByTime, mode } = params;
    const { translate } = useWixPatternsContainer();
    const toolbar = useFilterToolbarState();
    const [state] = useState(() => new DateRangeFilterState({
        translate,
        filter,
        toolbar,
        filterByTime,
        mode,
    }));
    return state;
}
//# sourceMappingURL=useDateRangeFilterState.js.map