decord/source/modules/parent_tools/native/showSpendingLimitReachedAlert.tsx
2026-08-15 05:55:55 +00:00

48 lines
1.8 KiB
TypeScript

// Module ID: 7620
// Function ID: 7621
// Name: isSpendingLimitError
// Dependencies: [4273, 4061, 7621, 4656, 1236, 5353, 4770, 2]
// Exports: isSpendingLimitError, showSpendingLimitReachedAlert
// Module 7620 (isSpendingLimitError)
const result = require("useUserIdsForLinkStatus").fileFinishedImporting("modules/parent_tools/native/showSpendingLimitReachedAlert.tsx");
export const isSpendingLimitError = function isSpendingLimitError(billingError) {
let tmp3 = billingError instanceof require(4273) /* V6OrEarlierAPIError */.BillingError;
if (tmp3) {
let tmp4 = billingError.code === tmp(4061).ErrorCodes.BILLING_SPENDING_LIMIT_REACHED;
if (!tmp4) {
tmp4 = billingError.code === tmp(4061).ErrorCodes.BILLING_SPENDING_LIMIT_WILL_EXCEED;
}
tmp3 = tmp4;
}
return tmp3;
};
export const showSpendingLimitReachedAlert = function showSpendingLimitReachedAlert() {
let obj = activeLinkUserIds(7621);
activeLinkUserIds = obj.getActiveLinkUserIds();
let obj1 = importDefault(4656);
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);
};