decord/source/modules/premium/native/hooks/useCheckoutPlanPriceString.tsx

49 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 7226
// Function ID: 7227
2026-07-20 16:05:17 +00:00
// Name: useCheckoutPlanPriceString
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 6782, 6765, 500, 2]
2026-07-20 16:05:17 +00:00
// Exports: useCheckoutPlanPriceString
2026-08-05 07:35:12 +00:00
// Module 7226 (useCheckoutPlanPriceString)
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
import { useNativeCheckoutStore } from "context";
const require = arg1;
2026-07-29 08:29:29 +00:00
const result = require("getPremiumBundledItemsFromProductId").fileFinishedImporting("modules/premium/native/hooks/useCheckoutPlanPriceString.tsx");
2026-07-20 16:05:17 +00:00
2026-07-21 22:01:30 +00:00
export const useCheckoutPlanPriceString = function useCheckoutPlanPriceString(productId, first) {
2026-07-23 10:11:24 +00:00
const _require = productId;
2026-07-20 16:05:17 +00:00
let priceString;
2026-07-29 08:29:29 +00:00
if (first != null) {
2026-07-21 22:01:30 +00:00
priceString = first.priceString;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (priceString == null) {
priceString = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const tmp3 = useNativeCheckoutStore((getCheckoutContextRecord) => getCheckoutContextRecord.getCheckoutContextRecord());
const dependencyMap = tmp3;
const items = [tmp3, productId];
2026-07-20 16:05:17 +00:00
const memo = React.useMemo(() => {
2026-07-29 08:29:29 +00:00
if (null == tmp3) {
2026-07-20 16:05:17 +00:00
return null;
} else {
2026-07-29 08:29:29 +00:00
const availablePlanForItems = obj.getAvailablePlanForItems(productId(tmp3[2]).getSubscriptionItemsForProduct(productId));
2026-07-20 16:05:17 +00:00
let priceString = null;
if (null != availablePlanForItems) {
priceString = availablePlanForItems.getPriceString();
}
return priceString;
}
2026-07-29 08:29:29 +00:00
obj = tmp3;
2026-07-20 16:05:17 +00:00
}, items);
2026-07-29 08:29:29 +00:00
const tmp2 = useNativeCheckoutStore((orderRequired) => orderRequired.orderRequired);
let tmp5 = priceString;
2026-07-20 16:05:17 +00:00
if (obj.isIOS()) {
2026-07-29 08:29:29 +00:00
tmp5 = priceString;
if (false !== tmp2) {
tmp5 = memo;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
return tmp5;
2026-07-20 16:05:17 +00:00
};