decord/alpha/source/modules/collectibles/native/useHandleUseNow.tsx

236 lines
7.9 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 10601
// Function ID: 10602
2026-07-20 16:05:17 +00:00
// Name: useHandleUseNow
2026-10-09 10:00:15 +00:00
// Dependencies: [19, 10602, 558, 576, 5055, 5941, 4938, 4768, 1126, 10603, 10606, 2]
2026-07-20 16:05:17 +00:00
2026-10-09 10:00:15 +00:00
// Module 10601 (useHandleUseNow)
import RootNavigationRef from "RootNavigationRef" /* 4938 */;
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 5055 */;
import ModalActionCreatorsDefault from "ModalActionCreators" /* 5941 */;
import MainTabsConstants from "MainTabsConstants" /* 10602 */;
2026-10-08 09:57:35 +00:00
import react from "react" /* 19 */;
2026-10-03 08:58:59 +00:00
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
const RootNavigatorScreen = MainTabsConstants.RootNavigatorScreen;
2026-10-08 09:57:35 +00:00
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useHandleUseNow(product) {
2026-10-03 08:58:59 +00:00
let analyticsLocations;
let canUseNow;
let isApplying;
let stageCollectibleChangeForEditProfile;
const tmp2 = stageCollectibleChangeForEditProfile;
const tmp = require;
let obj = require("react");
const cResult = obj.c(22);
product = product.product;
require = product;
const onSuccess = product.onSuccess;
({ analyticsLocations, stageCollectibleChangeForEditProfile } = product);
if (cResult[0] === onSuccess) {
let tmp4;
let tmp6;
if (cResult[1] === stageCollectibleChangeForEditProfile) {
tmp4 = cResult[2];
}
2026-10-08 09:57:35 +00:00
let closure_3 = tmp4;
2026-10-03 08:58:59 +00:00
const _Symbol = Symbol;
if (cResult[3] === Symbol.for("react.memo_cache_sentinel")) {
const fn2 = function h() {
let intl;
const obj = { key: "collectible shop apply error", content: intl.string(require("intl").t.CKsXk3) };
const open = onSuccess(stageCollectibleChangeForEditProfile[7]).open;
onSuccess(stageCollectibleChangeForEditProfile[7]);
intl = require("intl").intl;
open(obj);
};
cResult[3] = fn2;
tmp6 = fn2;
} else {
tmp6 = cResult[3];
}
if (cResult[4] === tmp4) {
let tmp7;
if (cResult[5] === product) {
tmp7 = cResult[6];
}
const tmpResult = tmp(tmp2[9]);
const handleUseNow1 = tmpResult.useHandleUseNow(tmp7);
const handleUseNow = handleUseNow1.handleUseNow;
({ isApplying, canUseNow } = handleUseNow1);
if (cResult[7] === tmp4) {
if (cResult[8] === product) {
if (cResult[9] === handleUseNow) {
2026-10-08 09:57:35 +00:00
let tmp9;
2026-10-03 08:58:59 +00:00
let tmp10;
if (cResult[10] === stageCollectibleChangeForEditProfile) {
2026-10-08 09:57:35 +00:00
tmp9 = cResult[11];
2026-10-03 08:58:59 +00:00
}
if (cResult[12] !== analyticsLocations) {
let obj2 = { analyticsLocations };
cResult[12] = analyticsLocations;
cResult[13] = obj2;
2026-10-08 09:57:35 +00:00
tmp10 = obj2;
2026-10-03 08:58:59 +00:00
} else {
2026-10-08 09:57:35 +00:00
tmp10 = cResult[13];
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
const tmp12 = onSuccess(tmp2[10])(tmp10);
let closure_5 = tmp12;
2026-10-03 08:58:59 +00:00
if (cResult[14] === onSuccess) {
2026-10-08 09:57:35 +00:00
let tmp13;
if (cResult[15] === tmp12) {
tmp13 = cResult[16];
2026-10-03 08:58:59 +00:00
}
if (cResult[17] === canUseNow) {
2026-10-08 09:57:35 +00:00
if (cResult[18] === tmp13) {
if (cResult[19] === tmp9) {
let tmp14;
2026-10-03 08:58:59 +00:00
if (cResult[20] === isApplying) {
2026-10-08 09:57:35 +00:00
tmp14 = cResult[21];
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
return tmp14;
2026-10-03 08:58:59 +00:00
}
}
}
2026-10-08 09:57:35 +00:00
let obj3 = { handleUseNow: tmp9, isApplying, canUseNow, handleEditProfile: tmp13 };
cResult[17] = canUseNow;
cResult[18] = tmp13;
cResult[19] = tmp9;
2026-10-03 08:58:59 +00:00
cResult[20] = isApplying;
cResult[21] = obj3;
2026-10-08 09:57:35 +00:00
tmp14 = obj3;
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
const fn4 = function k() {
2026-10-03 08:58:59 +00:00
closure_5();
if (null == onSuccess) {
const obj = ActionSheetActionCreatorsDefault;
obj.hideAllActionSheets();
const obj2 = ModalActionCreatorsDefault;
obj2.popAll();
} else {
tmp2();
}
};
2026-10-08 09:57:35 +00:00
cResult[14] = onSuccess;
cResult[15] = tmp12;
cResult[16] = fn4;
tmp13 = fn4;
2026-10-03 08:58:59 +00:00
}
}
}
2026-10-08 09:57:35 +00:00
const fn3 = function y() {
if (null != stageCollectibleChangeForEditProfile) {
tmp(require);
closure_3();
} else {
handleUseNow();
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
};
2026-10-03 08:58:59 +00:00
cResult[7] = tmp4;
cResult[8] = product;
cResult[9] = handleUseNow;
cResult[10] = stageCollectibleChangeForEditProfile;
2026-10-08 09:57:35 +00:00
cResult[11] = fn3;
tmp9 = fn3;
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
const obj4 = { product, onSuccess: tmp4, onError: tmp6 };
2026-10-03 08:58:59 +00:00
cResult[4] = tmp4;
cResult[5] = product;
2026-10-08 09:57:35 +00:00
cResult[6] = obj4;
tmp7 = obj4;
2026-10-03 08:58:59 +00:00
}
const fn = function n() {
if (null == onSuccess) {
const obj = ActionSheetActionCreatorsDefault;
obj.hideAllActionSheets();
const obj2 = ModalActionCreatorsDefault;
obj2.popAll();
if (null == stageCollectibleChangeForEditProfile) {
const obj3 = RootNavigationRef;
const rootNavigationRef = obj3.getRootNavigationRef();
const tmp9 = null != rootNavigationRef && rootNavigationRef.isReady();
if (tmp9) {
rootNavigationRef.navigate(RootNavigatorScreen.YOU);
}
}
} else {
tmp();
}
};
cResult[0] = onSuccess;
cResult[1] = stageCollectibleChangeForEditProfile;
cResult[2] = fn;
tmp4 = fn;
2026-10-08 09:57:35 +00:00
}) : (function useHandleUseNow(product) {
2026-10-03 08:58:59 +00:00
let canUseNow;
let isApplying;
let items2;
product = product.product;
require = product;
2026-10-03 08:58:59 +00:00
const stageCollectibleChangeForEditProfile = product.stageCollectibleChangeForEditProfile;
let onSuccess;
const items = [onSuccess, stageCollectibleChangeForEditProfile];
2026-10-03 08:58:59 +00:00
const analyticsLocations = product.analyticsLocations;
onSuccess = onSuccess.useCallback(() => {
2026-07-20 16:05:17 +00:00
if (null == onSuccess) {
2026-10-03 08:58:59 +00:00
const obj = ActionSheetActionCreatorsDefault;
obj.hideAllActionSheets();
const obj2 = ModalActionCreatorsDefault;
obj2.popAll();
if (null == stageCollectibleChangeForEditProfile) {
2026-10-03 08:58:59 +00:00
const obj3 = RootNavigationRef;
const rootNavigationRef = obj3.getRootNavigationRef();
const tmp9 = null != rootNavigationRef && rootNavigationRef.isReady();
if (tmp9) {
rootNavigationRef.navigate(RootNavigatorScreen.YOU);
}
2026-07-20 16:05:17 +00:00
}
} else {
2026-07-29 08:29:29 +00:00
tmp();
2026-07-20 16:05:17 +00:00
}
}, items);
const callback1 = onSuccess.useCallback(() => {
2026-10-03 08:58:59 +00:00
let intl;
const obj = { key: "collectible shop apply error", content: intl.string(require("intl").t.CKsXk3) };
const open = onSuccess(stageCollectibleChangeForEditProfile[7]).open;
onSuccess(stageCollectibleChangeForEditProfile[7]);
intl = require("intl").intl;
open(obj);
2026-07-20 16:05:17 +00:00
}, []);
2026-10-03 08:58:59 +00:00
let obj = require("hooks/useHandleUseNow");
const handleUseNow1 = obj.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) {
2026-10-03 08:58:59 +00:00
tmp(require);
callback();
} else {
handleUseNow();
}
}, items1);
2026-10-03 08:58:59 +00:00
const tmp5 = onSuccess(stageCollectibleChangeForEditProfile[10])({ analyticsLocations });
let closure_5 = tmp5;
let obj2 = {
handleUseNow: callback2,
isApplying,
canUseNow,
handleEditProfile: onSuccess.useCallback(() => {
closure_5();
if (null == onSuccess) {
const obj = ActionSheetActionCreatorsDefault;
obj.hideAllActionSheets();
const obj2 = ModalActionCreatorsDefault;
obj2.popAll();
} else {
tmp2();
}
}, items2)
};
items2 = [tmp5, onSuccess];
return obj2;
2026-10-03 08:58:59 +00:00
});
const result = size.fileFinishedImporting("modules/collectibles/native/useHandleUseNow.tsx");
export const useHandleUseNow = tmp2;