decord/source/modules/premium/premium_group/PremiumGroupUtils.shared.tsx

43 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 8309
// Function ID: 8310
2026-07-20 16:05:17 +00:00
// Name: getPriceString
2026-08-24 06:08:38 +00:00
// Dependencies: [4047, 4042, 5321, 2]
2026-07-20 16:05:17 +00:00
// Exports: getPriceString
2026-08-24 06:08:38 +00:00
// Module 8309 (getPriceString)
import getPremiumPlanItem from "getPremiumPlanItem" /* 4042 */;
import formatSingleCurrencyPrice from "formatSingleCurrencyPrice" /* 5321 */;
import closure_2 from "addSubscriptionPlan" /* 4047 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
const result = require("set").fileFinishedImporting("modules/premium/premium_group/PremiumGroupUtils.shared.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const getPriceString = function getPriceString(hasAnyPremiumGroup) {
if (null != hasAnyPremiumGroup) {
if (hasAnyPremiumGroup.hasAnyPremiumGroup) {
const planIdFromItems = hasAnyPremiumGroup.planIdFromItems;
2026-07-20 16:05:17 +00:00
if (null == planIdFromItems) {
return null;
} else {
2026-08-24 06:08:38 +00:00
const value = closure_2.get(planIdFromItems);
2026-07-20 16:05:17 +00:00
if (null == value) {
return null;
} else {
2026-08-24 06:08:38 +00:00
const price = getPremiumPlanItem.getPrice(planIdFromItems);
const obj2 = getPremiumPlanItem;
2026-07-29 08:29:29 +00:00
const tmp2 = require;
2026-08-24 06:08:38 +00:00
const formatPriceResult = formatSingleCurrencyPrice.formatPrice(price.amount, price.currency);
2026-07-20 16:05:17 +00:00
if (tmp) {
({ interval, intervalCount } = value);
2026-08-24 06:08:38 +00:00
return tmp2(5321).formatRate(formatPriceResult, interval, intervalCount);
2026-07-20 16:05:17 +00:00
} else {
return formatPriceResult;
}
2026-08-24 06:08:38 +00:00
const obj3 = formatSingleCurrencyPrice;
2026-07-20 16:05:17 +00:00
}
}
}
}
return null;
};