decord/source/modules/checkout/native/showCheckoutOrderErrorModal.tsx

209 lines
6.4 KiB
TypeScript
Raw Normal View History

2026-09-01 10:26:29 +00:00
// Module ID: 7175
// Function ID: 7176
2026-07-20 16:05:17 +00:00
// Name: SyncedLoadingAlertModal
2026-09-01 10:26:29 +00:00
// Dependencies: [5, 32, 19, 21, 4863, 1236, 4859, 2]
2026-07-29 08:29:29 +00:00
// Exports: showCheckoutOrderErrorModal, showRetryConfirmModal
2026-07-20 16:05:17 +00:00
2026-09-01 10:26:29 +00:00
// Module 7175 (SyncedLoadingAlertModal)
import useAlertStore from "useAlertStore" /* 4859 */;
2026-08-24 06:08:38 +00:00
import closure_2 from "asyncGeneratorStep" /* 5 */;
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import jsxProd from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function SyncedLoadingAlertModal(onConfirm) {
2026-07-23 10:11:24 +00:00
onConfirm = onConfirm.onConfirm;
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
2026-07-20 16:05:17 +00:00
({ title, content, confirmText, onCancel } = onConfirm);
2026-07-29 08:29:29 +00:00
[tmp2, c1] = callback2(React.useState(false), 2);
let obj = { title, content, actions: null };
obj = { children: null };
2026-08-24 06:08:38 +00:00
obj = {
variant: "primary",
text: confirmText,
onPress: callback(function*() {
if (c4 === 2) {
c4 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp6 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-08-24 06:08:38 +00:00
}
2026-07-29 08:29:29 +00:00
} else {
2026-08-24 06:08:38 +00:00
try {
c4 = 2;
if (0 === v0) {
if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
closure_0 = tmp3;
v0(true);
c3 = 1;
v0 = 2;
c4 = 1;
obj1 = { value: null, done: false };
obj1[0] = closure_1_0();
return obj1;
}
} else if (1 === tmp7) {
c3 = 0;
v0(false);
throw closure_2;
} else if (arg0 === 1) {
2026-07-29 08:29:29 +00:00
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
2026-08-24 06:08:38 +00:00
c3 = 0;
v0(false);
2026-07-29 08:29:29 +00:00
c4 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
c3 = 0;
v0(false);
c4 = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-08-24 06:08:38 +00:00
}
} catch (tmp22) {
closure_2 = tmp22;
if (tmp4 === c3) {
c4 = tmp2;
throw tmp22;
} else {
v0 = tmp;
2026-07-29 08:29:29 +00:00
}
}
}
2026-08-24 06:08:38 +00:00
}),
loading: tmp2
};
2026-09-01 10:26:29 +00:00
const items = [callback3(onConfirm(4863).AlertActionButton, obj), ];
2026-08-24 06:08:38 +00:00
obj1 = { variant: "secondary", text: null, onPress: null, loading: null };
2026-07-29 08:29:29 +00:00
const intl = onConfirm(1236).intl;
obj1[1] = intl.string(onConfirm(1236).t["ETE/oC"]);
obj1[2] = onCancel;
obj1[3] = tmp2;
2026-09-01 10:26:29 +00:00
items[1] = callback3(onConfirm(4863).AlertActionButton, obj1);
2026-07-29 08:29:29 +00:00
obj[0] = items;
obj[2] = callback4(closure_6, obj);
2026-09-01 10:26:29 +00:00
return callback3(onConfirm(4863).AlertModal, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ jsx: c5, Fragment: closure_6, jsxs: error } = jsxProd);
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/checkout/native/showCheckoutOrderErrorModal.tsx");
2026-07-29 08:29:29 +00:00
export const showRetryConfirmModal = function showRetryConfirmModal(dismissable) {
2026-07-20 16:05:17 +00:00
({ key, onCloseCallback } = dismissable);
2026-07-29 08:29:29 +00:00
const merged = Object.assign(dismissable, Object.create(null));
2026-08-24 06:08:38 +00:00
let obj = useAlertStore;
2026-07-20 16:05:17 +00:00
obj = {};
const merged1 = Object.assign(merged);
obj = { dismissable: dismissable.dismissable };
2026-07-29 08:29:29 +00:00
obj.openAlert(key, callback3(SyncedLoadingAlertModal, obj), onCloseCallback, obj);
};
2026-08-28 06:19:39 +00:00
export const showCheckoutOrderErrorModal = function showCheckoutOrderErrorModal(arg0, c6) {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-08-28 06:19:39 +00:00
closure_1 = c6;
2026-07-20 16:05:17 +00:00
return new Promise((arg0) => {
2026-07-29 08:29:29 +00:00
let callback = arg0;
let obj = { key: "checkout-order-error", title: null, content: null, confirmText: null, onConfirm: null, onCancel: null, dismissable: false };
const intl = callback(1236).intl;
obj[1] = intl.string(callback(1236).t.zrhHH3);
const intl2 = callback(1236).intl;
obj[2] = intl2.string(callback(1236).t.PjfUXe);
const intl3 = callback(1236).intl;
obj[3] = intl3.string(callback(1236).t["7NqTJn"]);
2026-08-24 06:08:38 +00:00
dependencyMap = closure_1_2(function*() {
2026-07-29 08:29:29 +00:00
if (c3 === 2) {
c3 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c3 = 2;
if (0 === c2) {
if (arg0 === 1) {
c3 = 3;
throw arg1;
} else if (arg0 === 2) {
c3 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
closure_1 = tmp5;
2026-07-29 08:29:29 +00:00
let callback = tmp2;
callback = undefined;
c2 = 1;
c3 = 1;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: false };
obj1[0] = closure_1_0();
2026-07-29 08:29:29 +00:00
return obj1;
}
} else if (arg0 === 1) {
c3 = 3;
throw arg1;
} else if (arg0 === 2) {
c3 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
callback = arg1;
callback(callback);
c3 = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} catch (tmp12) {
c3 = tmp;
throw tmp12;
}
}
2026-07-20 16:05:17 +00:00
});
2026-07-29 08:29:29 +00:00
obj[4] = function() {
const self = this;
const apply = closure_1.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj[5] = function onCancel() {
if (closure_1 != null) {
tmp();
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
callback(undefined);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
({ key, onCloseCallback } = obj);
const merged = Object.assign(obj, Object.create(null));
obj = {};
const merged1 = Object.assign(merged);
obj = { dismissable: obj.dismissable };
2026-09-01 10:26:29 +00:00
callback(4859).openAlert(key, closure_1_5(closure_1_8, obj), onCloseCallback, obj);
2026-07-20 16:05:17 +00:00
});
};