Files
discord-decomp/sources/modules/premium/premium_group/PremiumGroupUtils.shared.tsx
T
2026-07-28 01:06:53 +03:00

43 lines
2.3 KiB
TypeScript

/* Metro module 7946; source: modules/premium/premium_group/PremiumGroupUtils.shared.tsx; dependencies: [3807, 3802, 5137, 2] */
import SubscriptionPlanStore from '../../../stores/billing/SubscriptionPlanStore.tsx'; /* Metro dependency 3807 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun63408(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8124:6, offset: 0x01b7e5a3, size: 112 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('modules/premium/premium_group/PremiumGroupUtils.shared.tsx');
exports.getPriceString = getPriceString;
function getPriceString(a0, a1) { // fn#63409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8124:215, offset: 0x01b7e613, size: 197 bytes, params: 3, frame: 20
var planIdFromItems;
var value2;
var price;
var moduleValue2;
var value4;
if (a0 != null) {
if (a0.hasAnyPremiumGroup) {
planIdFromItems = a0.planIdFromItems;
if (planIdFromItems == null) {
return null;
}
value2 = SubscriptionPlanStore.get(planIdFromItems);
if (value2 == null) {
return null;
}
price = (require(3802) /* metro dependency 3802: PremiumUtils */).getPrice(planIdFromItems);
moduleValue2 = require(5137) /* metro dependency 5137: PriceUtils */;
value4 = moduleValue2.formatPrice(price.amount, price.currency);
if ((a1 ?? ({})).withIntervals) {
return (require(5137) /* metro dependency 5137: PriceUtils */).formatRate(value4, value2.interval,
value2.intervalCount);
}
return value4;
}
}
return null;
}
}
global.__d(_fun63408, 7946, [3807, 3802, 5137, 2]) /* metro module 7946, dependencies: [3807, 3802, 5137, 2] */;