decord/beta/source/modules/payments/native/NativePaymentContext.tsx
github-actions 19e52f659f chore: update source for beta 347.11
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-26 17:57:22 +00:00

62 lines
2.4 KiB
TypeScript

// Module ID: 11113
// Function ID: 11114
// Name: NativePaymentContext
// Dependencies: [32, 19, 4451, 1085, 21, 7702, 9512, 7531, 11114, 504, 2]
// Exports: NativePaymentContextProvider
// Module 11113 (NativePaymentContext)
import SubscriptionPlanActionCreators from "SubscriptionPlanActionCreators" /* 7531 */;
import ContextUtilsDefault from "ContextUtils" /* 7702 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
import SubscriptionPlanStore from "SubscriptionPlanStore" /* 4451 */;
require = fn;
const PaymentGateways = fn(1085).PaymentGateways;
const jsx = fn(21).jsx;
[closure_7, tmp4, tmp5] = ContextUtilsDefault();
const size = fn(2);
const result = size.fileFinishedImporting("modules/payments/native/NativePaymentContext.tsx");
export const NativePaymentContextProvider = function NativePaymentContextProvider(skuIDs) {
skuIDs = skuIDs.skuIDs;
let storeFront;
let selectedPlanId;
({ children, activeSubscription } = skuIDs);
const nativeIAPPayments = storeFront(selectedPlanId[6]).useNativeIAPPayments();
storeFront = nativeIAPPayments.storeFront;
const items = [storeFront, skuIDs];
const effect = noop.useEffect(() => {
let isFetchingForSKUsResult = null == storeFront;
if (!isFetchingForSKUsResult) {
isFetchingForSKUsResult = SubscriptionPlanStore.isFetchingForSKUs(skuIDs);
}
if (!isFetchingForSKUsResult) {
const subscriptionPlansBySKUs = SubscriptionPlanActionCreators.fetchSubscriptionPlansBySKUs(skuIDs, storeFront.country, PaymentGateways.APPLE_ADVANCED_COMMERCE);
}
}, items);
const tmp3 = storeFront(selectedPlanId[8])();
selectedPlanId = tmp3.selectedPlanId;
let obj = storeFront(selectedPlanId[6]);
const items1 = [SubscriptionPlanStore];
const items2 = [selectedPlanId];
const obj3 = { value: null, children: null };
const obj2 = skuIDs(selectedPlanId[9]);
obj3.value = {
isReadyToPurchase: nativeIAPPayments.nativePaymentsConnected,
setSelectedPlanId: tmp3.setSelectedPlanId,
selectedPlan: skuIDs(selectedPlanId[9]).useStateFromStores(items1, () => {
value = null;
if (null != selectedPlanId) {
value = SubscriptionPlanStore.get(tmp);
}
return value;
}, items2),
storeFront,
activeSubscription
};
obj3.children = children;
return <redux.Provider value={null}>{null}</redux.Provider>;
};
export const useNativeIAPPaymentContext = tmp4;
export const useForwardedNativePaymentContext = tmp5;