decord/source/modules/parent_tools/native/showSpendingLimitReachedAlert.tsx

53 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 7479
// Function ID: 7480
2026-07-20 16:05:17 +00:00
// Name: isSpendingLimitError
2026-08-25 06:04:03 +00:00
// Dependencies: [4278, 4065, 7480, 4745, 1236, 7193, 4393, 2]
2026-07-20 16:05:17 +00:00
// Exports: isSpendingLimitError, showSpendingLimitReachedAlert
2026-08-25 06:04:03 +00:00
// Module 7479 (isSpendingLimitError)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
2026-08-25 06:04:03 +00:00
import V6OrEarlierAPIError from "V6OrEarlierAPIError" /* 4278 */;
import _modDef4745 from "module_4745" /* 4745 */;
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/parent_tools/native/showSpendingLimitReachedAlert.tsx");
2026-07-20 16:05:17 +00:00
export const isSpendingLimitError = function isSpendingLimitError(billingError) {
2026-08-24 06:08:38 +00:00
let tmp3 = billingError instanceof V6OrEarlierAPIError.BillingError;
2026-07-29 08:29:29 +00:00
if (tmp3) {
2026-08-25 06:04:03 +00:00
let tmp4 = billingError.code === tmp(4065).ErrorCodes.BILLING_SPENDING_LIMIT_REACHED;
2026-07-20 16:05:17 +00:00
if (!tmp4) {
2026-08-25 06:04:03 +00:00
tmp4 = billingError.code === tmp(4065).ErrorCodes.BILLING_SPENDING_LIMIT_WILL_EXCEED;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp3 = tmp4;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp3;
2026-07-20 16:05:17 +00:00
};
export const showSpendingLimitReachedAlert = function showSpendingLimitReachedAlert() {
2026-08-25 06:04:03 +00:00
let obj = activeLinkUserIds(7480);
2026-07-23 10:11:24 +00:00
activeLinkUserIds = obj.getActiveLinkUserIds();
2026-08-25 06:04:03 +00:00
obj1 = _modDef4745;
2026-07-29 08:29:29 +00:00
obj = { title: null, body: null, isDismissable: true };
const intl = activeLinkUserIds(1236).intl;
obj[0] = intl.string(activeLinkUserIds(1236).t.QJKKrT);
const intl2 = activeLinkUserIds(1236).intl;
obj[1] = intl2.string(activeLinkUserIds(1236).t["73Islf"]);
2026-07-20 16:05:17 +00:00
if (activeLinkUserIds.length > 0) {
2026-07-29 08:29:29 +00:00
obj = { confirmText: null, onConfirm: null, cancelText: null };
const intl3 = tmp(1236).intl;
obj[0] = intl3.string(tmp(1236).t.GF9RCX);
obj[1] = function onConfirm() {
2026-08-24 06:08:38 +00:00
let obj = activeLinkUserIds(closure_1_2[5]);
2026-07-20 16:05:17 +00:00
obj.popLayer();
obj = { recipientIds: activeLinkUserIds };
2026-08-24 06:08:38 +00:00
closure_1_1(closure_1_2[6]).openPrivateChannel(obj);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
const intl4 = tmp(1236).intl;
obj[2] = intl4.string(tmp(1236).t.L5eIZ2);
2026-07-20 16:05:17 +00:00
obj1 = obj;
} else {
obj1 = {};
}
const merged = Object.assign(obj1);
obj1.show(obj);
};