import uninstallApp from "./uninstallApp";
import { concat } from "rxjs";
import { backupAppDataUseCaseDI } from "../device/use-cases/appDataBackup/backupAppDataUseCaseDI";
export default function uninstallAppWithBackup(transport, targetId, app, deviceId, storage, skipAppDataBackup = false) {
    const backup = backupAppDataUseCaseDI(transport, app.name, deviceId, storage);
    const uninstall = uninstallApp(transport, targetId, app);
    return skipAppDataBackup ? uninstall : concat(backup, uninstall);
}
//# sourceMappingURL=uninstallAppWithBackup.js.map