"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActionTypes = void 0;
var ActionTypes;
(function (ActionTypes) {
    ActionTypes["DRAG_OVER"] = "DRAG_OVER";
    ActionTypes["DRAG_OUT"] = "DRAG_OUT";
    ActionTypes["SET_INVALID_FILE"] = "SET_INVALID_FILE";
    ActionTypes["DROP_SUCCES"] = "DROP_SUCCES";
})(ActionTypes || (exports.ActionTypes = ActionTypes = {}));
const reducer = (state, action) => {
    if (action.type === ActionTypes.DRAG_OVER) {
        return {
            ...state,
            dragOver: true,
        };
    }
    if (action.type === ActionTypes.DRAG_OUT) {
        return {
            ...state,
            dragOver: false,
        };
    }
    if (action.type === ActionTypes.SET_INVALID_FILE) {
        return {
            ...state,
            message: action.payload.message,
        };
    }
    if (action.type === ActionTypes.DROP_SUCCES) {
        return {
            ...state,
            dragOver: false,
            message: action.payload.message,
        };
    }
    return state;
};
exports.default = reducer;
