export const toastsReducer = (state, action) => {
    switch (action.type) {
        case 'add': {
            return { list: [action.toast, ...state.list] };
        }
        case 'remove': {
            return { list: state.list.filter(t => t.id !== action.toast.id) };
        }
        default: {
            throw new Error(`Unhandled action type: ${action.type}`);
        }
    }
};
export const genericReducer = (state, action) => (state = action);
//# sourceMappingURL=reducers.js.map