Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
62 lines
2.4 KiB
TypeScript
62 lines
2.4 KiB
TypeScript
// Module ID: 10854
|
|
// Function ID: 10855
|
|
// Name: NativePaymentContext
|
|
// Dependencies: [32, 19, 4236, 1085, 21, 7442, 9398, 7271, 10855, 504, 2]
|
|
// Exports: NativePaymentContextProvider
|
|
|
|
// Module 10854 (NativePaymentContext)
|
|
import SubscriptionPlanActionCreators from "SubscriptionPlanActionCreators" /* 7271 */;
|
|
import ContextUtilsDefault from "ContextUtils" /* 7442 */;
|
|
import _slicedToArray from "module_32" /* 32 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import SubscriptionPlanStore from "SubscriptionPlanStore" /* 4236 */;
|
|
|
|
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;
|