import { __awaiter } from "tslib";
export default function useSave(appId, app, user, setRevisionID, clean, insertRow) {
    var _a, _b, _c;
    return __awaiter(this, void 0, void 0, function* () {
        const resp = yield insertRow({
            apprevision: appId,
            name: "",
            // @ts-ignore
            data: app,
            "revision-user": user.id,
        });
        const revisionId = (_c = (_b = (_a = resp.results) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.id;
        setRevisionID(revisionId);
        clean();
    });
}
//# sourceMappingURL=useSaveApp.js.map