var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var _a;
import { createSlice } from '@reduxjs/toolkit';
import { getDefaultFilters } from 'src/lib/common/helpers';
export var initialState = {
    filters: getDefaultFilters(),
    landingFilters: getDefaultFilters(),
    resultFilters: {},
};
export var filterSlice = createSlice({
    name: 'filter',
    initialState: initialState,
    reducers: {
        setFilters: function (state, action) {
            state.filters = __assign(__assign({}, state.filters), action.payload);
        },
        setLandingFilters: function (state, action) {
            state.landingFilters = action.payload;
        },
        setResultFilters: function (state, action) {
            state.resultFilters = action.payload;
        },
    },
});
export var setFilters = (_a = filterSlice.actions, _a.setFilters), setLandingFilters = _a.setLandingFilters, setResultFilters = _a.setResultFilters;
export default filterSlice.reducer;
