decord/alpha/source/modules/collectibles/native/useHandleUseNow.tsx
github-actions 52331fb8ae chore: update source for alpha 349.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5051.js (118.4 MB)
2026-09-30 07:29:52 +00:00

71 lines
2.9 KiB
TypeScript

// Module ID: 10751
// Function ID: 10752
// Name: useHandleUseNow
// Dependencies: [19, 10752, 4830, 5069, 4723, 4558, 1115, 10753, 9425, 2]
// Exports: useHandleUseNow
// Module 10751 (useHandleUseNow)
import RootNavigationRef from "RootNavigationRef" /* 4723 */;
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 4830 */;
import ModalActionCreatorsDefault from "ModalActionCreators" /* 5069 */;
import noop from "module_19" /* 19 */;
require = fn;
const RootNavigatorScreen = fn(10752).RootNavigatorScreen;
const size = fn(2);
const result = size.fileFinishedImporting("modules/collectibles/native/useHandleUseNow.tsx");
export const useHandleUseNow = function useHandleUseNow(analyticsLocations) {
const product = analyticsLocations.product;
require = product;
const stageCollectibleChangeForEditProfile = analyticsLocations.stageCollectibleChangeForEditProfile;
let onSuccess;
const items = [onSuccess, stageCollectibleChangeForEditProfile];
onSuccess = onSuccess.useCallback(() => {
if (null == onSuccess) {
ActionSheetActionCreatorsDefault.hideAllActionSheets();
ModalActionCreatorsDefault.popAll();
if (null == stageCollectibleChangeForEditProfile) {
const rootNavigationRef = RootNavigationRef.getRootNavigationRef();
if (tmp9) {
rootNavigationRef.navigate(RootNavigatorScreen.YOU);
}
tmp9 = null != rootNavigationRef && rootNavigationRef.isReady();
}
} else {
tmp();
}
}, items);
const callback1 = onSuccess.useCallback(() => {
const obj2 = { key: "collectible shop apply error", content: null };
const intl = product(stageCollectibleChangeForEditProfile[6]).intl;
obj2.content = intl.string(product(stageCollectibleChangeForEditProfile[6]).t.CKsXk3);
onSuccess(stageCollectibleChangeForEditProfile[5]).open(obj2);
}, []);
const handleUseNow1 = require("hooks/useHandleUseNow").useHandleUseNow({ product, onSuccess, onError: callback1 });
const handleUseNow = handleUseNow1.handleUseNow;
const items1 = [stageCollectibleChangeForEditProfile, product, onSuccess, handleUseNow];
({ isApplying, canUseNow } = handleUseNow1);
const callback2 = onSuccess.useCallback(() => {
if (null != stageCollectibleChangeForEditProfile) {
tmp(product);
callback();
} else {
handleUseNow();
}
}, items1);
const tmp5 = onSuccess(stageCollectibleChangeForEditProfile[8])({ analyticsLocations: analyticsLocations.analyticsLocations });
closure_5 = tmp5;
let obj2 = { handleUseNow: callback2, isApplying, canUseNow, handleEditProfile: null };
const items2 = [tmp5, onSuccess];
obj2.handleEditProfile = onSuccess.useCallback(() => {
closure_5();
if (null == onSuccess) {
ActionSheetActionCreatorsDefault.hideAllActionSheets();
ModalActionCreatorsDefault.popAll();
} else {
tmp2();
}
}, items2);
return obj2;
};