decord/source/231_Alert.js

103 lines
2.5 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 231
2026-07-29 08:29:29 +00:00
// Function ID: 232
2026-07-20 16:05:17 +00:00
// Name: Alert
2026-07-29 08:29:29 +00:00
// Dependencies: [41, 42, 232]
2026-07-20 16:05:17 +00:00
// Module 231 (Alert)
2026-08-24 06:08:38 +00:00
import _createClassDefault from "_createClass" /* 42 */;
import closure_2 from "_classCallCheck" /* 41 */;
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
let Alert = arg1;
class Alert {
constructor() {
2026-08-24 06:08:38 +00:00
tmp = closure_2(this, Alert);
2026-07-29 08:29:29 +00:00
return;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
const items = [
{
2026-07-20 16:05:17 +00:00
key: "alert",
2026-07-29 08:29:29 +00:00
value: function alert(Alert, arg1, items) {
Alert = arg3;
const _default = Alert(232).default;
2026-07-20 16:05:17 +00:00
if (_default) {
2026-07-29 08:29:29 +00:00
let str = Alert;
2026-08-24 06:08:38 +00:00
dependencyMap = _default.getConstants();
2026-07-29 08:29:29 +00:00
if (!Alert) {
2026-07-20 16:05:17 +00:00
str = "";
}
2026-07-29 08:29:29 +00:00
let str2 = arg1;
let obj = { title: null, message: null, cancelable: false };
obj[0] = str;
if (!arg1) {
2026-07-20 16:05:17 +00:00
str2 = "";
}
2026-07-29 08:29:29 +00:00
obj[1] = str2;
2026-07-20 16:05:17 +00:00
let cancelable = arg3;
if (arg3) {
cancelable = arg3.cancelable;
}
if (cancelable) {
obj.cancelable = arg3.cancelable;
}
if (items) {
let substr = items.slice(0, 3);
} else {
2026-07-29 08:29:29 +00:00
substr = [{ text: "OK" }];
2026-07-20 16:05:17 +00:00
}
let arr = substr.pop();
arr = substr.pop();
const arr1 = substr.pop();
if (arr1) {
obj.buttonNeutral = arr1.text || "";
}
if (arr) {
obj.buttonNegative = arr.text || "";
}
if (arr) {
obj.buttonPositive = arr.text || "OK";
}
2026-07-29 08:29:29 +00:00
_default.showAlert(obj, (arg0) => console.warn(arg0), (arg0, arg1) => {
if (arg0 === buttonClicked.buttonClicked) {
if (arg1 === tmp.buttonNeutral) {
2026-07-20 16:05:17 +00:00
if (arr1.onPress) {
2026-07-29 08:29:29 +00:00
obj2.onPress();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj2 = arr1;
} else if (arg1 === tmp.buttonNegative) {
2026-07-20 16:05:17 +00:00
if (arr.onPress) {
2026-07-29 08:29:29 +00:00
obj.onPress();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = arr;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
let onPress = arg1 === tmp.buttonPositive;
2026-07-20 16:05:17 +00:00
if (onPress) {
onPress = arr.onPress;
}
if (onPress) {
arr.onPress();
}
}
} else {
2026-07-29 08:29:29 +00:00
let onDismiss = arg0 === tmp.dismissed && closure_0;
2026-07-20 16:05:17 +00:00
if (onDismiss) {
2026-07-23 10:11:24 +00:00
onDismiss = closure_0.onDismiss;
2026-07-20 16:05:17 +00:00
}
if (onDismiss) {
2026-07-23 10:11:24 +00:00
closure_0.onDismiss();
2026-07-20 16:05:17 +00:00
}
}
});
}
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "prompt",
2026-07-29 08:29:29 +00:00
value: function prompt(arg0) {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
];
2026-08-24 06:08:38 +00:00
export default _createClassDefault(Alert, null, items);