decord/source/modules/parent_tools/native/showSpendingLimitReachedAlert.tsx
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

51 lines
2.2 KiB
TypeScript

// Module ID: 10833
// Function ID: 10834
// Name: showSpendingLimitReachedAlert
// Dependencies: [4537, 4316, 8768, 4981, 1114, 7689, 4649, 2]
// Exports: isSpendingLimitError, showSpendingLimitReachedAlert
// Module 10833 (showSpendingLimitReachedAlert)
import V6OrEarlierAPIError from "V6OrEarlierAPIError" /* 4537 */;
import ChannelActionCreatorsDefault from "ChannelActionCreators" /* 4649 */;
import actions_AlertActionCreatorsDefault from "actions/AlertActionCreators" /* 4981 */;
import LayerActionCreators from "LayerActionCreators" /* 7689 */;
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("modules/parent_tools/native/showSpendingLimitReachedAlert.tsx");
export const isSpendingLimitError = function isSpendingLimitError(billingError) {
let tmp3 = billingError instanceof V6OrEarlierAPIError.BillingError;
if (tmp3) {
let tmp4 = billingError.code === tmp(4316).ErrorCodes.BILLING_SPENDING_LIMIT_REACHED;
if (!tmp4) {
tmp4 = billingError.code === tmp(4316).ErrorCodes.BILLING_SPENDING_LIMIT_WILL_EXCEED;
}
tmp3 = tmp4;
}
return tmp3;
};
export const showSpendingLimitReachedAlert = function showSpendingLimitReachedAlert() {
activeLinkUserIds = activeLinkUserIds(8768).getActiveLinkUserIds();
let obj = activeLinkUserIds(8768);
const obj3 = { title: null, body: null, isDismissable: true };
const intl = activeLinkUserIds(1114).intl;
obj3.title = intl.string(activeLinkUserIds(1114).t.QJKKrT);
const intl2 = activeLinkUserIds(1114).intl;
obj3.body = intl2.string(activeLinkUserIds(1114).t["73Islf"]);
if (activeLinkUserIds.length > 0) {
const obj4 = { confirmText: null, onConfirm: null, cancelText: null };
const intl3 = tmp(1114).intl;
obj4.confirmText = intl3.string(tmp(1114).t.GF9RCX);
obj4.onConfirm = function onConfirm() {
LayerActionCreators.popLayer();
ChannelActionCreatorsDefault.openPrivateChannel({ recipientIds: activeLinkUserIds });
};
const intl4 = tmp(1114).intl;
obj4.cancelText = intl4.string(tmp(1114).t.L5eIZ2);
let obj5 = obj4;
} else {
obj5 = {};
}
const merged = Object.assign(obj5);
actions_AlertActionCreatorsDefault.show(obj3);
};