export async function dispatchFileManagerAction(action, handlers) {
    switch (action) {
        case "back": {
            void handlers.goBack();
            break;
        }
        case "home": {
            void handlers.goHome();
            break;
        }
        case "add-folder": {
            handlers.addFolder();
            break;
        }
        case "move": {
            void handlers.moveItem();
            break;
        }
        case "remove": {
            handlers.removeItem();
            break;
        }
        case "rename": {
            handlers.renameItem();
            break;
        }
        case "rotate": {
            await handlers.rotateImage();
            break;
        }
        case "select": {
            handlers.selectCurrentItem();
            break;
        }
        case "file-upload": {
            handlers.triggerFileUpload();
            break;
        }
        default: {
            console.error("#handleActions > Aucune action correspondante");
        }
    }
}
