decord/source/actions/native/AlertActionCreators.tsx

246 lines
6.8 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 4656
// Function ID: 4657
// Dependencies: [19, 21, 4342, 709, 4657, 1236, 1367, 4660, 4763, 4763, 2007, 2]
2026-07-20 16:05:17 +00:00
2026-08-15 05:55:55 +00:00
// Module 4656
2026-07-29 08:29:29 +00:00
import "noop";
2026-07-23 10:11:24 +00:00
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
let c3;
let c4;
let c5;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ jsx: c3, Fragment: c4, jsxs: c5 } = jsxProd);
2026-07-23 10:11:24 +00:00
let c6 = null;
let c7 = 0;
2026-07-29 08:29:29 +00:00
const result = require("ACTION_SHEET_HEIGHT_HALF").fileFinishedImporting("actions/native/AlertActionCreators.tsx");
2026-07-23 10:11:24 +00:00
export default {
2026-07-20 16:05:17 +00:00
openLazy(hideActionSheet) {
let flag = hideActionSheet.hideActionSheet;
if (flag === undefined) {
flag = true;
}
let flag2 = hideActionSheet.isDismissable;
if (flag2 === undefined) {
flag2 = false;
}
return hideActionSheet.importer().then((alert) => {
if (flag) {
2026-07-23 10:11:24 +00:00
let obj = flag2(outer1_2[2]);
2026-07-20 16:05:17 +00:00
obj.hideActionSheet();
}
obj = { type: "ALERT_OPEN", alert, isDismissable: flag2 };
2026-07-23 10:11:24 +00:00
flag2(outer1_2[3]).dispatch(obj);
2026-07-20 16:05:17 +00:00
});
},
close() {
2026-07-23 10:11:24 +00:00
if (null != c6) {
c6 = null;
2026-08-15 05:55:55 +00:00
require(4657) /* useAlertStore */.dismissAlert(tmp);
const obj = require(4657) /* useAlertStore */;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
importDefault(709).dispatch({ type: "ALERT_CLOSE" });
2026-07-20 16:05:17 +00:00
},
show(hideActionSheet) {
let body;
let body2;
2026-07-23 10:11:24 +00:00
let c3;
let c4;
2026-07-20 16:05:17 +00:00
let cancelText;
let children;
let confirmColor;
let confirmText;
let confirmText2;
let isDismissable;
let title;
let flag = hideActionSheet.hideActionSheet;
if (flag === undefined) {
flag = true;
}
({ isDismissable, confirmText } = hideActionSheet);
if (confirmText === undefined) {
2026-07-29 08:29:29 +00:00
const intl = confirmText(1236).intl;
confirmText = intl.string(confirmText(1236).t.BddRzS);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let merged = Object.assign(hideActionSheet, Object.create(null));
2026-07-20 16:05:17 +00:00
let dependencyMap;
let callback;
2026-07-23 10:11:24 +00:00
c4 = undefined;
let c5;
2026-08-11 06:20:06 +00:00
let obj = confirmText(1367);
2026-07-29 08:29:29 +00:00
if (obj.isMobileVisualRefreshEnabled("AlertActionCreators")) {
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-23 10:11:24 +00:00
let merged1 = Object.assign(merged);
2026-07-29 08:29:29 +00:00
obj.confirmText = confirmText;
obj.isDismissable = isDismissable;
2026-07-20 16:05:17 +00:00
({ body, confirmText: confirmText2 } = obj);
2026-08-04 21:03:28 +00:00
let tmp9 = null != body && typeof body !== "string";
2026-07-29 08:29:29 +00:00
if (tmp9) {
2026-07-20 16:05:17 +00:00
const _Array = Array;
2026-07-29 08:29:29 +00:00
tmp9 = !Array.isArray(body);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp11 = null == obj.title;
if (!tmp11) {
tmp11 = "" === obj.title;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
2026-08-04 21:03:28 +00:00
tmp11 = null != confirmText2 && typeof confirmText2 !== "string";
const tmp12 = null != confirmText2 && typeof confirmText2 !== "string";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = tmp9;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = null != obj.footer;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = null != obj.helpText;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = null != obj.renderConfirmButton;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = null != obj.renderConfirmIcon;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = null != obj.renderConfirmRightIcon;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = true === obj.noDefaultButtons;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = null != obj.secondaryConfirmText;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = null != obj.onConfirmSecondary;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = true === obj.isConfirmButtonDisabled;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = null != obj.confirming;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = null != obj.style;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = true === obj.fillCancelText;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = false === obj.autoCloseOnConfirm;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = null != obj.onClose;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
2026-07-20 16:05:17 +00:00
if (flag) {
2026-08-15 05:55:55 +00:00
let obj4 = merged(4342);
2026-07-29 08:29:29 +00:00
obj4.hideActionSheet();
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if (null != c6) {
2026-08-15 05:55:55 +00:00
let tmp4Result = tmp4(4657);
2026-07-29 08:29:29 +00:00
tmp4Result.dismissAlert(c6);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
merged(709).dispatch({ type: "ALERT_CLOSE" });
2026-07-20 16:05:17 +00:00
let closure_7 = tmp24 + 1;
const text = `legacy-alert-${tmp24}`;
dependencyMap = text;
2026-07-23 10:11:24 +00:00
c6 = text;
({ cancelText, onConfirm: c3, onCancel: c4 } = merged);
c5 = false;
2026-07-20 16:05:17 +00:00
({ title, body: body2, children, confirmColor } = merged);
2026-08-15 05:55:55 +00:00
tmp4Result = tmp4(4657);
2026-07-29 08:29:29 +00:00
obj = { title: null, content: null, extraContent: null, actions: null };
obj[0] = title;
obj[1] = body2;
obj[2] = children;
const obj1 = { variant: null, text: null, onPress: null };
const obj7 = merged(709);
const tmp27 = c5;
const tmp28 = c4;
2026-08-15 05:55:55 +00:00
obj1[0] = tmp4(4763).getAlertButtonVariant(confirmColor);
2026-07-29 08:29:29 +00:00
obj1[1] = confirmText;
obj1[2] = function onPress() {
let c5 = true;
if (c3 != null) {
tmp();
}
2026-07-20 16:05:17 +00:00
};
2026-08-15 05:55:55 +00:00
const items = [callback(tmp4(4660).AlertActionButton, obj1), ];
2026-07-29 08:29:29 +00:00
let tmp26Result = null;
2026-07-20 16:05:17 +00:00
if (null != cancelText) {
2026-07-29 08:29:29 +00:00
const obj2 = { variant: "secondary", text: null, onPress: null };
obj2[1] = cancelText;
obj2[2] = function onPress() {
let c5 = true;
if (c4 != null) {
tmp();
}
2026-07-20 16:05:17 +00:00
};
2026-08-15 05:55:55 +00:00
tmp26Result = tmp26(tmp4(4660).AlertActionButton, obj2);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj3 = { children: null };
items[1] = tmp26Result;
obj3[0] = items;
obj[3] = tmp27(tmp28, obj3);
obj4 = { dismissable: null };
obj4[0] = true === isDismissable;
2026-08-15 05:55:55 +00:00
tmp4Result.openAlert(text, callback(tmp4(4660).AlertModal, obj), () => {
2026-07-23 10:11:24 +00:00
if (!c5) {
2026-07-29 08:29:29 +00:00
if (c4 != null) {
tmp();
}
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if (c6 === c2) {
c6 = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}, obj4);
2026-08-15 05:55:55 +00:00
const tmp4Result1 = tmp4(4763);
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
if (null != c6) {
2026-08-15 05:55:55 +00:00
tmp4(4657).dismissAlert(c6);
2026-07-23 10:11:24 +00:00
c6 = null;
2026-08-15 05:55:55 +00:00
const tmp4Result2 = tmp4(4657);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
this.openLazy({
2026-07-20 16:05:17 +00:00
importer() {
2026-07-23 10:11:24 +00:00
return confirmText(_undefined[10])(_undefined[9], _undefined.paths).then((arg0) => {
2026-07-20 16:05:17 +00:00
let closure_0 = arg0.default;
return (arg0) => {
const obj = {};
const merged = Object.assign(arg0);
2026-07-29 08:29:29 +00:00
const merged1 = Object.assign(outer1_1);
obj.confirmText = closure_0;
return outer2_3(closure_0, obj);
2026-07-20 16:05:17 +00:00
};
});
},
hideActionSheet: flag,
isDismissable
2026-07-29 08:29:29 +00:00
});
2026-07-20 16:05:17 +00:00
},
confirm(arg0) {
2026-07-23 10:11:24 +00:00
const self = this;
2026-07-29 08:29:29 +00:00
let closure_0 = arg0;
2026-07-20 16:05:17 +00:00
return new Promise((arg0) => {
2026-07-29 08:29:29 +00:00
const callback = arg0;
2026-07-20 16:05:17 +00:00
const obj = {
onConfirm() {
2026-07-23 10:11:24 +00:00
callback(true);
2026-07-29 08:29:29 +00:00
},
cancelText: null,
onCancel: null
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
const intl = callback(outer1_2[5]).intl;
obj[1] = intl.string(callback(outer1_2[5]).t["ETE/oC"]);
obj[2] = function onCancel() {
2026-07-23 10:11:24 +00:00
callback(false);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
const merged = Object.assign(callback);
self.show(obj);
2026-07-20 16:05:17 +00:00
});
}
};