decord/source/modules/collectibles/native/useHandleUseNow.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

83 lines
3.3 KiB
TypeScript

// Module ID: 11088
// Function ID: 11089
// Name: useHandleUseNow
// Dependencies: [19, 11089, 4527, 4763, 4418, 4259, 1114, 11090, 11093, 9212, 2]
// Exports: useHandleUseNow
// Module 11088 (useHandleUseNow)
import closure_3 from "noop" /* 19 */;
import { RootNavigatorScreen } from "MODE_CHANGE_PHYSICS" /* 11089 */;
let require = arg1;
let result = require("set").fileFinishedImporting("modules/collectibles/native/useHandleUseNow.tsx");
export const useHandleUseNow = function useHandleUseNow(analyticsLocations) {
const product = analyticsLocations.product;
require = product;
const onSuccess = analyticsLocations.onSuccess;
const stageCollectibleChangeForEditProfile = analyticsLocations.stageCollectibleChangeForEditProfile;
let callback;
let handleUseNow;
closure_5 = undefined;
const items = [onSuccess, stageCollectibleChangeForEditProfile];
callback = callback.useCallback(() => {
if (null == onSuccess) {
onSuccess(stageCollectibleChangeForEditProfile[2]).hideAllActionSheets();
const obj = onSuccess(stageCollectibleChangeForEditProfile[2]);
const tmp4 = stageCollectibleChangeForEditProfile;
onSuccess(stageCollectibleChangeForEditProfile[3]).popAll();
if (null == stageCollectibleChangeForEditProfile) {
const rootNavigationRef = product(tmp4[4]).getRootNavigationRef();
const obj3 = product(tmp4[4]);
if (tmp9) {
rootNavigationRef.navigate(handleUseNow.YOU);
}
tmp9 = null != rootNavigationRef && rootNavigationRef.isReady();
}
const obj2 = onSuccess(stageCollectibleChangeForEditProfile[3]);
} else {
tmp();
}
}, items);
const callback1 = callback.useCallback(() => {
let obj = onSuccess(stageCollectibleChangeForEditProfile[5]);
obj = { key: "collectible shop apply error", content: null };
const intl = product(stageCollectibleChangeForEditProfile[6]).intl;
obj[1] = intl.string(product(stageCollectibleChangeForEditProfile[6]).t.CKsXk3);
obj.open(obj);
}, []);
let obj = require(stageCollectibleChangeForEditProfile[7]);
handleUseNow = obj.useHandleUseNow({ product, onSuccess: callback, onError: callback1 });
handleUseNow = handleUseNow.handleUseNow;
const items1 = [stageCollectibleChangeForEditProfile, product, callback, handleUseNow];
({ isApplying, canUseNow } = handleUseNow);
const callback2 = callback.useCallback(() => {
if (null != stageCollectibleChangeForEditProfile) {
const result = product(stageCollectibleChangeForEditProfile[8]).commitCollectiblePreview();
tmp(closure_0);
callback();
} else {
handleUseNow();
}
}, items1);
const tmp5 = onSuccess(stageCollectibleChangeForEditProfile[9])({ analyticsLocations: analyticsLocations.analyticsLocations });
closure_5 = tmp5;
obj = {
handleUseNow: callback2,
isApplying,
canUseNow,
handleEditProfile: callback.useCallback(() => {
callback();
if (null == onSuccess) {
onSuccess(stageCollectibleChangeForEditProfile[2]).hideAllActionSheets();
const obj = onSuccess(stageCollectibleChangeForEditProfile[2]);
onSuccess(stageCollectibleChangeForEditProfile[3]).popAll();
const obj2 = onSuccess(stageCollectibleChangeForEditProfile[3]);
} else {
tmp2();
}
}, items2)
};
items2 = [tmp5, onSuccess];
return obj;
};