2026-09-18 06:58:00 +00:00
|
|
|
// Module ID: 10948
|
|
|
|
|
// Function ID: 10949
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: showSpendingLimitReachedAlert
|
2026-09-18 06:58:00 +00:00
|
|
|
// Dependencies: [4622, 4402, 8883, 5067, 1115, 7782, 4735, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: isSpendingLimitError, showSpendingLimitReachedAlert
|
|
|
|
|
|
2026-09-18 06:58:00 +00:00
|
|
|
// Module 10948 (showSpendingLimitReachedAlert)
|
|
|
|
|
import V6OrEarlierAPIError from "V6OrEarlierAPIError" /* 4622 */;
|
|
|
|
|
import ChannelActionCreatorsDefault from "ChannelActionCreators" /* 4735 */;
|
|
|
|
|
import actions_AlertActionCreatorsDefault from "actions/AlertActionCreators" /* 5067 */;
|
|
|
|
|
import LayerActionCreators from "LayerActionCreators" /* 7782 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = size.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-09-18 06:58:00 +00:00
|
|
|
let tmp4 = billingError.code === tmp(4402).ErrorCodes.BILLING_SPENDING_LIMIT_REACHED;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (!tmp4) {
|
2026-09-18 06:58:00 +00:00
|
|
|
tmp4 = billingError.code === tmp(4402).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-09-18 06:58:00 +00:00
|
|
|
activeLinkUserIds = activeLinkUserIds(8883).getActiveLinkUserIds();
|
|
|
|
|
let obj = activeLinkUserIds(8883);
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj3 = { title: null, body: null, isDismissable: true };
|
2026-09-15 14:23:42 +00:00
|
|
|
const intl = activeLinkUserIds(1115).intl;
|
|
|
|
|
obj3.title = intl.string(activeLinkUserIds(1115).t.QJKKrT);
|
|
|
|
|
const intl2 = activeLinkUserIds(1115).intl;
|
|
|
|
|
obj3.body = intl2.string(activeLinkUserIds(1115).t["73Islf"]);
|
2026-07-20 16:05:17 +00:00
|
|
|
if (activeLinkUserIds.length > 0) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj4 = { confirmText: null, onConfirm: null, cancelText: null };
|
2026-09-15 14:23:42 +00:00
|
|
|
const intl3 = tmp(1115).intl;
|
|
|
|
|
obj4.confirmText = intl3.string(tmp(1115).t.GF9RCX);
|
2026-09-10 05:38:07 +00:00
|
|
|
obj4.onConfirm = function onConfirm() {
|
|
|
|
|
LayerActionCreators.popLayer();
|
|
|
|
|
ChannelActionCreatorsDefault.openPrivateChannel({ recipientIds: activeLinkUserIds });
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
2026-09-15 14:23:42 +00:00
|
|
|
const intl4 = tmp(1115).intl;
|
|
|
|
|
obj4.cancelText = intl4.string(tmp(1115).t.L5eIZ2);
|
2026-09-10 05:38:07 +00:00
|
|
|
let obj5 = obj4;
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
2026-09-10 05:38:07 +00:00
|
|
|
obj5 = {};
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
const merged = Object.assign(obj5);
|
|
|
|
|
actions_AlertActionCreatorsDefault.show(obj3);
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|