decord/source/modules/quests/native/QuestHomeBounties.tsx

499 lines
20 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 14488
// Function ID: 14489
2026-07-20 16:05:17 +00:00
// Name: EmptyState
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 19, 17, 7490, 6753, 1388, 21, 712, 14489, 4668, 10992, 1236, 5452, 4739, 14486, 1377, 7404, 709, 14490, 4347, 7508, 7518, 6756, 14427, 6579, 9539, 9540, 9544, 7507, 14500, 10996, 8068, 14501, 10723, 589, 14504, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 14488 (EmptyState)
import ThemesDefault from "Themes" /* 712 */;
import Text from "Text" /* 4739 */;
import AccountAgeTier10LargeBadge from "AccountAgeTier10LargeBadge" /* 5452 */;
import useTrackQuestEventWithImpression from "useTrackQuestEventWithImpression" /* 10992 */;
import BountiesCtaDescriptionDefault from "BountiesCtaDescription" /* 14504 */;
import closure_3 from "_slicedToArray" /* 32 */;
import importAllResult from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
import closure_6 from "set" /* 7490 */;
import { BountyCarouselEmptyStateReason as closure_7 } from "QuestsExperimentLocations" /* 6753 */;
import { ContentDismissActionType } from "ContentDismissActionType" /* 1388 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function EmptyState(reason) {
reason = reason.reason;
const tmp = callback4();
2026-08-24 06:08:38 +00:00
let obj = useTrackQuestEventWithImpression;
2026-07-20 16:05:17 +00:00
const bountyCarouselEmptyStateAnalytics = obj.useBountyCarouselEmptyStateAnalytics(reason);
if (reason === constants.COMPLETED) {
2026-07-29 08:29:29 +00:00
const intl2 = tmp2(1236).intl;
let stringResult = intl2.string(tmp2(1236).t.O2hRaZ);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl = tmp2(1236).intl;
stringResult = intl.string(tmp2(1236).t.TKuW8z);
2026-07-20 16:05:17 +00:00
}
if (reason === constants.COMPLETED) {
2026-07-29 08:29:29 +00:00
let ReqPds = tmp2(1236).t["D/790X"];
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
ReqPds = tmp2(1236).t.ReqPds;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { style: tmp.emptyState, children: null };
2026-08-24 06:08:38 +00:00
const items = [callback2(AccountAgeTier10LargeBadge.BountiesPosterIllocon, { size: 32 }), ];
2026-07-29 08:29:29 +00:00
obj = { style: tmp.emptyStateText, children: null };
2026-08-24 06:08:38 +00:00
const items1 = [callback2(Text.Text, { variant: "text-sm/semibold", color: "text-default", children: stringResult }), ];
obj1 = { variant: "text-xs/medium", color: "text-muted", children: null };
2026-07-29 08:29:29 +00:00
const intl3 = tmp2(1236).intl;
obj1[2] = intl3.format(ReqPds, {
2026-07-20 16:05:17 +00:00
onClickLearnMore() {
2026-07-29 08:29:29 +00:00
callback(table[14])();
2026-07-20 16:05:17 +00:00
}
});
2026-08-24 06:08:38 +00:00
items1[1] = callback2(Text.Text, obj1);
2026-07-29 08:29:29 +00:00
obj[1] = items1;
2026-07-20 16:05:17 +00:00
items[1] = callback3(View, obj);
2026-07-29 08:29:29 +00:00
obj[1] = items;
2026-07-20 16:05:17 +00:00
return callback3(View, obj);
}
function ItemSeparator() {
const style = { width: PX_16 };
return callback2(View, { style });
}
function keyExtractor(id) {
return id.id;
}
function QuestHomeBountiesCarousel(bounties) {
bounties = bounties.bounties;
({ orbShopProducts, obtainableOrbRewards, showOrbShopPlaceholderCarousel } = bounties);
if (showOrbShopPlaceholderCarousel === undefined) {
showOrbShopPlaceholderCarousel = false;
}
2026-07-23 10:11:24 +00:00
let ref;
let first;
2026-07-20 16:05:17 +00:00
let callback;
2026-07-23 10:11:24 +00:00
let first1;
2026-08-24 06:08:38 +00:00
closure_5 = undefined;
2026-07-23 10:11:24 +00:00
let first2;
2026-08-24 06:08:38 +00:00
closure_7 = undefined;
closure_8 = undefined;
2026-07-20 16:05:17 +00:00
let callback2;
2026-08-24 06:08:38 +00:00
closure_10 = undefined;
2026-07-23 10:11:24 +00:00
callback = undefined;
2026-08-24 06:08:38 +00:00
closure_12 = undefined;
closure_13 = undefined;
2026-07-20 16:05:17 +00:00
let callback4;
2026-08-24 06:08:38 +00:00
closure_15 = undefined;
2026-07-23 10:11:24 +00:00
let callback6;
let callback7;
let isInView;
let tmp = callback4();
2026-07-20 16:05:17 +00:00
let tmp2 = obtainableOrbRewards > 0;
if (tmp2) {
2026-07-24 07:16:23 +00:00
tmp2 = orbShopProducts.length >= bounties(first[18]).MIN_PRODUCTS_FOR_ORB_SHOP_CAROUSEL || showOrbShopPlaceholderCarousel;
2026-07-29 08:29:29 +00:00
let tmp5 = orbShopProducts.length >= bounties(first[18]).MIN_PRODUCTS_FOR_ORB_SHOP_CAROUSEL || showOrbShopPlaceholderCarousel;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
ref = first1.useRef(null);
2026-07-29 08:29:29 +00:00
const tmp7 = callback(first1.useState(0), 2);
first = tmp7[0];
callback = tmp7[1];
const tmp9 = callback(first1.useState(0), 2);
first1 = tmp9[0];
closure_5 = tmp9[1];
const tmp11 = callback(first1.useState(false), 2);
first2 = tmp11[0];
closure_7 = tmp11[1];
2026-07-23 10:11:24 +00:00
closure_8 = first1.useRef(null);
callback2 = first1.useRef(false);
closure_10 = first1.useRef({ parent: { scrollX: 0 }, children: {}, axis: "horizontal" });
callback = first1.useCallback((arg0) => {
2026-07-20 16:05:17 +00:00
if (null != arg0) {
const _Object2 = Object;
if (Object.hasOwn(closure_10.current.children, arg0)) {
2026-07-29 08:29:29 +00:00
if (tmp8.current.children[arg0] != null) {
const calculateVisibility2 = tmp9.calculateVisibility;
if (calculateVisibility2 != null) {
calculateVisibility2();
}
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
tmp8 = closure_10;
2026-07-20 16:05:17 +00:00
} else {
const _Object = Object;
const values = Object.values(closure_10.current.children);
2026-07-29 08:29:29 +00:00
for (const item10013 of values) {
if (item10013 != null) {
let calculateVisibility = item10013.calculateVisibility;
if (calculateVisibility != null) {
let calculateVisibilityResult = calculateVisibility();
}
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
continue;
2026-07-20 16:05:17 +00:00
}
}
}, []);
const items = [callback];
const items1 = [bounties.length];
2026-07-23 10:11:24 +00:00
const callback1 = first1.useCallback((nativeEvent) => {
2026-07-20 16:05:17 +00:00
callback(nativeEvent.nativeEvent.layout.width);
closure_10.current.parent.layout = nativeEvent.nativeEvent.layout;
callback();
}, items);
const items2 = [first];
2026-07-23 10:11:24 +00:00
const memo = first1.useMemo(() => {
2026-07-20 16:05:17 +00:00
const array = new Array(bounties.length);
return array.fill(0).map((arg0, arg1) => arg1 * closure_13);
}, items1);
2026-07-23 10:11:24 +00:00
callback2 = first1.useCallback(() => {
2026-07-29 08:29:29 +00:00
let obj = { style: null };
2026-07-20 16:05:17 +00:00
obj = { width: Math.max(0, first - bounties(first[8]).CARD_WIDTH - callback) };
2026-07-29 08:29:29 +00:00
obj[0] = obj;
2026-07-20 16:05:17 +00:00
return callback4(closure_5, obj);
}, items2);
2026-07-23 10:11:24 +00:00
closure_12 = first1.useRef(first1);
closure_13 = first1.useRef(null);
2026-07-20 16:05:17 +00:00
const items3 = [callback];
2026-07-23 10:11:24 +00:00
const callback3 = first1.useCallback((nativeEvent) => {
2026-07-29 08:29:29 +00:00
const rounded = Math.round(nativeEvent.nativeEvent.contentOffset.x / ref2);
if (rounded !== ref.current) {
ref.current = rounded;
2026-07-20 16:05:17 +00:00
const _Date = Date;
const timestamp = Date.now();
2026-07-29 08:29:29 +00:00
let tmp5 = null == ref2.current;
if (!tmp5) {
tmp5 = timestamp - tmp3.current >= 50;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp5) {
tmp3.current = timestamp;
2026-07-24 07:16:23 +00:00
const result = bounties(first[19]).triggerHapticFeedback(bounties(first[19]).HapticFeedbackTypes.IMPACT_LIGHT);
const obj = bounties(first[19]);
2026-07-20 16:05:17 +00:00
}
}
closure_10.current.parent.scrollX = nativeEvent.nativeEvent.contentOffset.x;
callback();
}, items3);
2026-07-23 10:11:24 +00:00
callback4 = first1.useRef(false);
closure_15 = first1.useRef(null);
2026-07-20 16:05:17 +00:00
const items4 = [first1];
2026-07-23 10:11:24 +00:00
callback4 = first1.useCallback(() => {
2026-07-20 16:05:17 +00:00
closure_14.current = false;
2026-07-29 08:29:29 +00:00
if (null != ref3.current) {
2026-07-20 16:05:17 +00:00
const _clearTimeout = clearTimeout;
2026-07-29 08:29:29 +00:00
clearTimeout(tmp.current);
tmp.current = null;
2026-07-20 16:05:17 +00:00
}
}, []);
2026-07-29 08:29:29 +00:00
const callback5 = first1.useCallback((nativeEvent) => {
const rounded = Math.round(nativeEvent.nativeEvent.contentOffset.x / closure_13);
2026-07-20 16:05:17 +00:00
closure_14.current = false;
2026-07-29 08:29:29 +00:00
if (rounded !== first1) {
let QUEST_HOME_MOBILE_CAROUSEL = first;
2026-07-24 07:16:23 +00:00
const BountyScrollingType = bounties(first[21]).BountyScrollingType;
2026-07-29 08:29:29 +00:00
let result = { scrollingType: null, scrollingDirection: null, carouselPosition: null, questContent: null };
result[0] = tmp2 ? BountyScrollingType.AUTO : BountyScrollingType.MANUAL;
if (rounded > tmp3) {
let LEFT = tmp6(QUEST_HOME_MOBILE_CAROUSEL[21]).HorizontalScrollingDirection.RIGHT;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
LEFT = tmp6(QUEST_HOME_MOBILE_CAROUSEL[21]).HorizontalScrollingDirection.LEFT;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
result[1] = LEFT;
result[2] = rounded;
QUEST_HOME_MOBILE_CAROUSEL = tmp6(QUEST_HOME_MOBILE_CAROUSEL[22]).QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
result[3] = QUEST_HOME_MOBILE_CAROUSEL;
2026-07-24 07:16:23 +00:00
result = bounties(first[20]).trackBountyCarouselScroll(result);
2026-07-29 08:29:29 +00:00
callback2(rounded);
2026-07-24 07:16:23 +00:00
const obj2 = bounties(first[20]);
2026-07-20 16:05:17 +00:00
}
}, items4);
2026-07-23 10:11:24 +00:00
callback6 = first1.useCallback((arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-29 08:29:29 +00:00
if (null != ref3.current) {
2026-07-20 16:05:17 +00:00
const _clearTimeout = clearTimeout;
2026-07-29 08:29:29 +00:00
clearTimeout(tmp.current);
tmp.current = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
ref3.current = setTimeout(() => {
2026-08-24 06:08:38 +00:00
closure_1_14.current = true;
const current = closure_1_1.current;
2026-07-29 08:29:29 +00:00
if (current != null) {
const obj = { offset: null, animated: true };
obj[0] = closure_0 * closure_13;
2026-07-20 16:05:17 +00:00
current.scrollToOffset(obj);
}
2026-08-24 06:08:38 +00:00
closure_1_15.current = null;
2026-07-20 16:05:17 +00:00
}, 350);
}, []);
2026-07-23 10:11:24 +00:00
const effect = first1.useEffect(() => () => {
2026-07-29 08:29:29 +00:00
if (null != ref.current) {
2026-07-20 16:05:17 +00:00
const _clearTimeout = clearTimeout;
2026-07-29 08:29:29 +00:00
clearTimeout(tmp.current);
tmp.current = null;
2026-07-20 16:05:17 +00:00
}
}, []);
const items5 = [bounties, first1, callback6];
2026-07-23 10:11:24 +00:00
const effect1 = first1.useEffect(() => {
2026-07-20 16:05:17 +00:00
function handleModalClose(key) {
2026-08-24 06:08:38 +00:00
if (key.key === handleModalClose(closure_1_2[23]).BOUNTIES_MODAL_KEY) {
2026-07-29 08:29:29 +00:00
callback(false);
const current = ref.current;
ref.current = null;
2026-07-20 16:05:17 +00:00
if (null != current) {
2026-08-24 06:08:38 +00:00
let isBountyCompletedResult = closure_1_6.isBountyCompleted(current);
2026-07-20 16:05:17 +00:00
if (isBountyCompletedResult) {
2026-07-29 08:29:29 +00:00
isBountyCompletedResult = !ref2.current;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
ref2.current = false;
const findIndexResult = current.findIndex((id) => id.id === current);
2026-08-24 06:08:38 +00:00
closure_1 = findIndexResult;
2026-07-20 16:05:17 +00:00
if (-1 !== findIndexResult) {
2026-07-29 08:29:29 +00:00
const findIndexResult1 = obj.findIndex((id) => {
2026-08-24 06:08:38 +00:00
let tmp = arg1 > closure_1_4;
2026-07-20 16:05:17 +00:00
if (tmp) {
2026-07-23 10:11:24 +00:00
tmp = arg1 > closure_1;
2026-07-20 16:05:17 +00:00
}
if (tmp) {
2026-08-24 06:08:38 +00:00
tmp = !closure_2_6.isBountyCompleted(id.id);
2026-07-20 16:05:17 +00:00
}
return tmp;
});
if (isBountyCompletedResult) {
isBountyCompletedResult = -1 !== findIndexResult1;
}
if (isBountyCompletedResult) {
2026-07-29 08:29:29 +00:00
isBountyCompletedResult = findIndexResult1 <= closure_4 + 3;
2026-07-20 16:05:17 +00:00
}
if (isBountyCompletedResult) {
2026-08-24 06:08:38 +00:00
handleModalClose(closure_1_2[24]).runAfterInteractions(() => {
closure_1_16(findIndexResult1);
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
const tmpResult = handleModalClose(closure_1_2[24]);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
obj = current;
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-24 07:16:23 +00:00
const subscription = ref(first[17]).subscribe("MODAL_POP", handleModalClose);
2026-07-20 16:05:17 +00:00
return () => {
2026-07-24 07:16:23 +00:00
ref(first[17]).unsubscribe("MODAL_POP", handleModalClose);
2026-07-20 16:05:17 +00:00
};
}, items5);
2026-07-29 08:29:29 +00:00
callback7 = first1.useCallback((bountyId) => {
2026-07-24 07:16:23 +00:00
let obj = bounties(first[25]);
if (obj.shouldMigrateToAdAnalyticsInterface(bounties(first[25]).AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL, "quest_home_bounties")) {
let tmpResult = tmp(tmp2[26]);
2026-07-29 08:29:29 +00:00
obj = { type: null, adCreativeType: null, adCreativeId: null, questContentCTA: null, surfaceId: null, sourceQuestContent: null, questContentPosition: null };
obj[0] = tmp(tmp2[27]).AdUserActionType.CLICK_INTERNAL;
obj[1] = tmp(tmp2[28]).AdCreativeType.BOUNTY;
obj[2] = bountyId.id;
obj[3] = tmp(tmp2[21]).QuestContentCTA.START_BOUNTY;
obj[4] = tmp(tmp2[22]).QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
obj[5] = tmp(tmp2[22]).QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
obj[6] = arg1;
2026-07-20 16:05:17 +00:00
tmpResult.captureAdUserAction(obj);
} else {
2026-07-24 07:16:23 +00:00
tmpResult = tmp(tmp2[20]);
2026-07-29 08:29:29 +00:00
obj = { adContentId: null, adCreativeType: null, questContent: null, questContentCTA: null, sourceQuestContent: null, questContentPosition: null };
obj[0] = bountyId.id;
obj[1] = tmp(tmp2[28]).AdCreativeType.BOUNTY;
obj[2] = tmp(tmp2[22]).QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
obj[3] = tmp(tmp2[21]).QuestContentCTA.START_BOUNTY;
obj[4] = tmp(tmp2[22]).QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
obj[5] = arg1;
2026-07-20 16:05:17 +00:00
const result = tmpResult.trackAdContentClicked(obj);
}
closure_8.current = bountyId.id;
closure_9.current = first2.isBountyCompleted(bountyId.id);
callback3(true);
2026-07-24 07:16:23 +00:00
const obj6 = ref(first[23]);
obj6.showModal({ bountyId: bountyId.id, sourceQuestContent: bounties(first[22]).QuestContent.QUEST_HOME_MOBILE_CAROUSEL });
2026-07-20 16:05:17 +00:00
}, []);
2026-07-29 08:29:29 +00:00
const tmp26 = ref(first[29])();
isInView = tmp26.isInView;
2026-07-20 16:05:17 +00:00
const items6 = [first1, callback7, isInView, first2];
const items7 = [bounties, callback];
2026-07-23 10:11:24 +00:00
const callback8 = first1.useCallback((item) => {
2026-07-20 16:05:17 +00:00
item = item.item;
const index = item.index;
2026-08-24 06:08:38 +00:00
return closure_9(bounties(first[30]).BillableAdPlacementImpressionTrackerNative, {
adContentId: item.id,
adCreativeType: bounties(first[28]).AdCreativeType.BOUNTY,
questContent: bounties(first[22]).QuestContent.QUEST_HOME_MOBILE_CAROUSEL,
questContentPosition: index,
trackGuildAndChannelMetadata: false,
visibilityRef: closure_10,
sourceQuestContent: bounties(first[22]).QuestContent.QUEST_HOME_MOBILE_CAROUSEL,
overrideVisibility: isInView && undefined,
children() {
return callback(ref(first[8]), { bounty: item, index, isActive: index === closure_1_4, isModalVisible: closure_1_6, onPress: closure_1_17 });
}
}, item.id);
2026-07-20 16:05:17 +00:00
}, items6);
const items8 = [isInView, first1, first2];
2026-07-23 10:11:24 +00:00
const callback9 = first1.useCallback((arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-23 10:11:24 +00:00
let obj = {};
let merged = Object.assign(arg0);
2026-07-29 08:29:29 +00:00
obj.onLayout = function onLayout(nativeEvent) {
let obj = index;
if (null != index[index.index]) {
obj = {};
2026-08-24 06:08:38 +00:00
const merged = Object.assign(closure_1_10.current.children[tmp.id]);
2026-07-29 08:29:29 +00:00
obj.layout = nativeEvent.nativeEvent.layout;
2026-08-24 06:08:38 +00:00
closure_1_10.current.children[tmp.id] = obj;
closure_1_11(tmp.id);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj.onLayout(nativeEvent);
2026-07-20 16:05:17 +00:00
};
return callback4(closure_5, obj);
}, items7);
2026-07-29 08:29:29 +00:00
let obj = { style: tmp.container, children: null };
obj = { ref: tmp26.containerRef, onLayout: callback1, children: null };
2026-07-23 10:11:24 +00:00
const memo1 = first1.useMemo(() => ({ isInView, activeIndex: first1, isModalVisible: first2 }), items8);
2026-07-29 08:29:29 +00:00
obj = { ref, horizontal: true, data: bounties, renderItem: callback8, keyExtractor: callback7, contentContainerStyle: tmp.listContentContainer, snapToOffsets: memo, snapToEnd: false, decelerationRate: "fast", showsHorizontalScrollIndicator: false, ItemSeparatorComponent: callback6, ListFooterComponent: callback2, onScroll: callback3, onScrollBeginDrag: callback4, onMomentumScrollEnd: callback5, scrollEventThrottle: 16, extraData: memo1, CellRendererComponent: callback9 };
obj[2] = callback2(bounties(first[31]).FlashList, obj);
2026-07-20 16:05:17 +00:00
const items9 = [callback2(closure_5, obj), ];
2026-07-29 08:29:29 +00:00
let tmp32Result = null;
2026-07-20 16:05:17 +00:00
if (tmp2) {
2026-08-24 06:08:38 +00:00
obj1 = { orbShopProducts: null, obtainableOrbRewards: null, showOrbShopPlaceholderCarousel: null };
2026-07-29 08:29:29 +00:00
obj1[0] = orbShopProducts;
obj1[1] = obtainableOrbRewards;
obj1[2] = showOrbShopPlaceholderCarousel;
tmp32Result = callback2(ref(first[32]), obj1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items9[1] = tmp32Result;
obj[1] = items9;
2026-07-20 16:05:17 +00:00
return closure_10(closure_5, obj);
}
2026-07-29 08:29:29 +00:00
let c4 = importAllResult;
({ jsx: c9, jsxs: c10 } = jsxProd);
2026-08-24 06:08:38 +00:00
let PX_16 = ThemesDefault.space.PX_16;
PX_16 = ThemesDefault.space.PX_16;
2026-07-23 10:11:24 +00:00
let closure_13 = require("CARD_WIDTH").CARD_WIDTH + PX_16;
2026-07-29 08:29:29 +00:00
let closure_14 = createCacheKey.createStyles(() => {
let obj = { container: null, listContentContainer: null, emptyState: null, emptyStateText: null };
2026-08-24 06:08:38 +00:00
obj = { marginBottom: ThemesDefault.space.PX_48 };
2026-07-29 08:29:29 +00:00
obj[0] = obj;
2026-07-20 16:05:17 +00:00
obj = { paddingLeft: PX_16 };
2026-07-29 08:29:29 +00:00
obj[1] = obj;
2026-08-24 06:08:38 +00:00
obj[2] = { flexDirection: "row", alignItems: "center", gap: ThemesDefault.space.PX_12, borderWidth: 1, borderColor: ThemesDefault.colors.BORDER_MUTED, backgroundColor: ThemesDefault.colors.BACKGROUND_SURFACE_HIGH, borderRadius: ThemesDefault.radii.lg, overflow: "hidden", paddingHorizontal: ThemesDefault.space.PX_16, paddingVertical: 14, marginHorizontal: ThemesDefault.space.PX_16 };
2026-07-29 08:29:29 +00:00
obj[3] = { flex: 1, gap: 2 };
2026-07-20 16:05:17 +00:00
return obj;
});
const memoResult = importAllResult.memo(function QuestHomeBounties(arg0) {
({ verticalScrollEnabled, orbShopProducts, obtainableOrbRewards, showOrbShopPlaceholderCarousel } = arg0);
if (showOrbShopPlaceholderCarousel === undefined) {
showOrbShopPlaceholderCarousel = false;
}
2026-07-29 08:29:29 +00:00
let obj = dependencyMap;
2026-08-24 06:08:38 +00:00
obj1 = first(10723);
2026-07-29 08:29:29 +00:00
const questHomeBounties = obj1.useQuestHomeBounties().questHomeBounties;
const tmp2 = callback4();
first = undefined;
2026-08-24 06:08:38 +00:00
importDefault = undefined;
2026-07-29 08:29:29 +00:00
dependencyMap = undefined;
if (questHomeBounties.length > 0) {
2026-08-11 06:20:06 +00:00
const items = [tmp(1377).DismissibleContent.BOUNTIES_NUX_PROMO_SHEET];
2026-07-29 08:29:29 +00:00
let items1 = items;
} else {
items1 = [];
}
2026-08-24 06:08:38 +00:00
let tmpResult = tmp(7404);
2026-07-29 08:29:29 +00:00
const tmp3 = callback(tmpResult.useSelectedDismissibleContent(items1), 2);
first = tmp3[0];
importDefault = tmp5;
dependencyMap = importAllResult.useRef(false);
const items2 = [first];
const effect = importAllResult.useEffect(() => {
let current = first !== first(ref[15]).DismissibleContent.BOUNTIES_NUX_PROMO_SHEET;
if (!current) {
current = ref.current;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!current) {
ref.current = true;
2026-08-24 06:08:38 +00:00
callback(ref[14])();
2026-07-29 08:29:29 +00:00
}
}, items2);
const items3 = [first, tmp3[1]];
const effect1 = importAllResult.useEffect(() => {
function handleHide(key) {
2026-08-24 06:08:38 +00:00
if (key.key === handleHide(closure_1_2[14]).PROMO_SHEET_KEY) {
callback(closure_1_8.USER_DISMISS);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
if (handleHide === first(ref[15]).DismissibleContent.BOUNTIES_NUX_PROMO_SHEET) {
2026-08-24 06:08:38 +00:00
const subscription = callback(tmp[17]).subscribe("HIDE_ACTION_SHEET", handleHide);
2026-07-29 08:29:29 +00:00
return () => {
callback(table[17]).unsubscribe("HIDE_ACTION_SHEET", handleHide);
};
}
tmp = ref;
}, items3);
let tmp8 = 0 === questHomeBounties.length;
tmpResult = tmp(589);
2026-08-24 06:08:38 +00:00
const items4 = [closure_6];
const stateFromStores = tmpResult.useStateFromStores(items4, () => closure_6.areAllBountiesCompleted());
2026-07-29 08:29:29 +00:00
let tmp10 = !tmp8;
if (!tmp8) {
tmp10 = !stateFromStores;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp10) {
tmp10 = obtainableOrbRewards > 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp10) {
2026-08-24 06:08:38 +00:00
tmp10 = orbShopProducts.length >= tmp(14490).MIN_PRODUCTS_FOR_ORB_SHOP_CAROUSEL || showOrbShopPlaceholderCarousel;
const tmp11 = orbShopProducts.length >= tmp(14490).MIN_PRODUCTS_FOR_ORB_SHOP_CAROUSEL || showOrbShopPlaceholderCarousel;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp8) {
2026-07-20 16:05:17 +00:00
if (!stateFromStores) {
if (verticalScrollEnabled) {
2026-07-29 08:29:29 +00:00
obj = { style: null, children: null };
obj[0] = tmp2.container;
obj = { bounties: null };
obj[0] = questHomeBounties;
2026-08-24 06:08:38 +00:00
const items5 = [callback2(BountiesCtaDescriptionDefault, obj), ];
2026-07-29 08:29:29 +00:00
let tmp17Result = null;
if (tmp10) {
obj1 = { orbShopProducts: null, obtainableOrbRewards: null, showOrbShopPlaceholderCarousel: null };
obj1[0] = orbShopProducts;
obj1[1] = obtainableOrbRewards;
obj1[2] = showOrbShopPlaceholderCarousel;
2026-08-24 06:08:38 +00:00
tmp17Result = tmp17(tmp18(14501), obj1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items5[1] = tmp17Result;
obj[1] = items5;
let tmp15Result = closure_10(View, obj);
const tmp15 = closure_10;
const tmp16 = View;
tmp17 = callback2;
tmp18 = importDefault;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj2 = { bounties: null, orbShopProducts: null, obtainableOrbRewards: null, showOrbShopPlaceholderCarousel: null };
obj2[0] = questHomeBounties;
obj2[1] = orbShopProducts;
obj2[2] = obtainableOrbRewards;
obj2[3] = showOrbShopPlaceholderCarousel;
tmp15Result = callback2(QuestHomeBountiesCarousel, obj2);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp15Result;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
const obj3 = { style: tmp2.container, children: null };
2026-07-20 16:05:17 +00:00
if (verticalScrollEnabled) {
2026-07-29 08:29:29 +00:00
obj = { bounties: null, isEmptyOrCompleted: null };
obj[0] = questHomeBounties;
if (!tmp8) {
tmp8 = stateFromStores;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = tmp8;
2026-08-24 06:08:38 +00:00
let tmp20Result = tmp20(BountiesCtaDescriptionDefault, obj);
const tmp25 = BountiesCtaDescriptionDefault;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj4 = { reason: null };
obj4[0] = tmp8 ? closure_7.EMPTY : closure_7.COMPLETED;
tmp20Result = tmp20(EmptyState, obj4);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj3[1] = tmp20Result;
tmp20Result = tmp20(View, obj3);
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/quests/native/QuestHomeBounties.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;