decord/source/modules/parent_tools/native/showSpendingLimitReachedAlert.tsx
2026-07-31 08:44:05 +00:00

48 lines
1.8 KiB
TypeScript

// Module ID: 6257
// Function ID: 6258
// Name: isSpendingLimitError
// Dependencies: [4092, 3861, 6258, 4533, 1236, 5848, 4203, 2]
// Exports: isSpendingLimitError, showSpendingLimitReachedAlert
// Module 6257 (isSpendingLimitError)
const result = require("useUserIdsForLinkStatus").fileFinishedImporting("modules/parent_tools/native/showSpendingLimitReachedAlert.tsx");
export const isSpendingLimitError = function isSpendingLimitError(billingError) {
let tmp3 = billingError instanceof require(4092) /* V6OrEarlierAPIError */.BillingError;
if (tmp3) {
let tmp4 = billingError.code === tmp(3861).ErrorCodes.BILLING_SPENDING_LIMIT_REACHED;
if (!tmp4) {
tmp4 = billingError.code === tmp(3861).ErrorCodes.BILLING_SPENDING_LIMIT_WILL_EXCEED;
}
tmp3 = tmp4;
}
return tmp3;
};
export const showSpendingLimitReachedAlert = function showSpendingLimitReachedAlert() {
let obj = activeLinkUserIds(6258);
activeLinkUserIds = obj.getActiveLinkUserIds();
let obj1 = importDefault(4533);
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"]);
if (activeLinkUserIds.length > 0) {
obj = { confirmText: null, onConfirm: null, cancelText: null };
const intl3 = tmp(1236).intl;
obj[0] = intl3.string(tmp(1236).t.GF9RCX);
obj[1] = function onConfirm() {
let obj = activeLinkUserIds(outer1_2[5]);
obj.popLayer();
obj = { recipientIds: activeLinkUserIds };
outer1_1(outer1_2[6]).openPrivateChannel(obj);
};
const intl4 = tmp(1236).intl;
obj[2] = intl4.string(tmp(1236).t.L5eIZ2);
obj1 = obj;
} else {
obj1 = {};
}
const merged = Object.assign(obj1);
obj1.show(obj);
};