Files
2026-07-28 01:06:53 +03:00

95 lines
5.6 KiB
TypeScript

/* Metro module 13407; source: modules/parent_tools/hooks/useFamilyCenterActivities.tsx; dependencies: [5116, 5117, 632, 5187, 5137, 2] */
import FamilyCenterStore from '../FamilyCenterStore.tsx'; /* Metro dependency 5116 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as FamilyCenterConstantsModule from '../FamilyCenterConstants.tsx'; /* Metro dependency 5117 */
function _fun102029(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:6, offset: 0x02228ae7, size: 179 bytes, params: 8, frame: 19
let env0_0 = require;
const closure = function(a0) {
var env0_0 = a0;
return require(dependencyMap[2]).useStateFromStores([FamilyCenterStore], _fun102031);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/hooks/useFamilyCenterActivities.tsx');
exports.useActionsForDisplayType = function(a0) {
var env0_0 = a0;
return require(dependencyMap[2]).useStateFromStoresArray([FamilyCenterStore], _fun102033);
};
exports.useActionTotalsForDisplayType = closure;
exports.useHasActionForAnyDisplayType = function() {
return require(dependencyMap[2]).useStateFromStores([FamilyCenterStore], _fun102035);
};
exports.useFormattedTotalForDisplayType = useFormattedTotalForDisplayType;
function useActionTotalsForDisplayType(a0) { // fn#102030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:138, offset: 0x02228b9a, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (UseStateFromStoresModule).useStateFromStores([FamilyCenterStore],
_fun102031);
function _fun102031() { // fn#102031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:219, offset: 0x02228bdc, size: 27 bytes, params: 1, frame: 11
return FamilyCenterStore.getTotalForDisplayType(env0_0);
}
}
function useActionsForDisplayType(a0) { // fn#102032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:370, offset: 0x02228bf7, size: 67 bytes, params: 2, frame: 14
const env0_0 = a0;
return (UseStateFromStoresModule).useStateFromStoresArray([FamilyCenterStore],
_fun102033);
function _fun102033() { // fn#102033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:451, offset: 0x02228c3a, size: 27 bytes, params: 1, frame: 11
return FamilyCenterStore.getActionsForDisplayType(env0_0);
}
}
function useHasActionForAnyDisplayType() { // fn#102034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:582, offset: 0x02228c55, size: 59 bytes, params: 1, frame: 13
return (UseStateFromStoresModule).useStateFromStores([FamilyCenterStore],
_fun102035);
function _fun102035() { // fn#102035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:662, offset: 0x02228c90, size: 47 bytes, params: 1, frame: 11
var environment;
const Object = global.Object;
const values = Object.values;
const value = environment.__proto__;
return Reflect.apply(values, Object, [TeenActionDisplayType]).some(_fun102036);
function _fun102036(a0) { // fn#102036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:689, offset: 0x02228cbf, size: 29 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return FamilyCenterStore.getTotalForDisplayType(a0) > 0;
}
}
}
function useFormattedTotalForDisplayType(a0) { // fn#102037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:761, offset: 0x02228cdc, size: 174 bytes, params: 2, frame: 18
var r1;
var totalSpendAmount;
var totalSpendCurrency;
var value;
const r2 = useActionTotalsForDisplayType(a0) ?? 0;
const TOTAL_VOICE_MINUTES = TeenActionDisplayType.TOTAL_VOICE_MINUTES;
if (a0 === TOTAL_VOICE_MINUTES) {
return (require(5187) /* metro dependency 5187: FamilyCenterUtils */).formatTotalTime(r2);
}
const PURCHASES = TeenActionDisplayType.PURCHASES;
if (a0 === PURCHASES) {
totalSpendAmount = FamilyCenterStore.getTotalSpendAmount();
totalSpendCurrency = FamilyCenterStore.getTotalSpendCurrency();
if (totalSpendAmount == null) {
r1 = r2;
} else if (totalSpendCurrency == null) {
r1 = r2;
} else {
value = require(5137) /* metro dependency 5137: PriceUtils */;
value = value.shortenAndFormatPrice(totalSpendAmount, totalSpendCurrency);
r1 = value;
}
return r1;
}
return r2;
}
}
global.__d(_fun102029, 13407, [5116, 5117, 632, 5187, 5137,
2]) /* metro module 13407, dependencies: [5116, 5117, 632, 5187, 5137, 2] */;