"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "focusedPathReducer", {
    enumerable: true,
    get: function() {
        return focusedPathReducer;
    }
});
function focusedPathReducer(state, action) {
    switch(action.type){
        case 'reset':
            {
                return [];
            }
        case 'set_initial_focus':
            {
                return [
                    0
                ];
            }
        case 'change_last_focus':
            {
                return [
                    ...state.slice(0, -1),
                    action.value
                ];
            }
        case 'add_focus':
            {
                return [
                    ...state,
                    action.value
                ];
            }
        case 'return_prev_focus':
            {
                return [
                    ...state.slice(0, -1)
                ];
            }
        default:
            {
                return state;
            }
    }
}
