decord/beta/source/modules/quests/native/BountiesCtaHeader.tsx
github-actions 30c0bb2ec3 chore: update source for beta 347.10
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
2026-09-24 16:03:38 +00:00

756 lines
30 KiB
TypeScript

// Module ID: 15345
// Function ID: 15346
// Name: BountiesCtaHeader
// Dependencies: [19, 17, 4782, 15346, 5695, 21, 580, 5225, 4790, 558, 568, 504, 15327, 8615, 1119, 5220, 4786, 15336, 15347, 5702, 7991, 5698, 8001, 15279, 15281, 1181, 15348, 15349, 15350, 11938, 4503, 15330, 11942, 2]
// Module 15345 (BountiesCtaHeader)
import initialize from "initialize" /* 504 */;
import c from "c" /* 568 */;
import nativeDefault from "native" /* 580 */;
import util from "util" /* 1119 */;
import components_Button_Button from "components/Button/Button" /* 5220 */;
import QuestTypes from "QuestTypes" /* 5698 */;
import AdCreativeType from "AdCreativeType" /* 5702 */;
import AnalyticsActions from "AnalyticsActions" /* 7991 */;
import AnalyticsTypes from "AnalyticsTypes" /* 8001 */;
import common_Video from "common/Video" /* 8615 */;
import BountiesModalActionCreatorsDefault from "BountiesModalActionCreators" /* 15279 */;
import BountiesModalTypes from "BountiesModalTypes" /* 15281 */;
import _modDef15327 from "module_15327" /* 15327 */;
import openBountiesNuxPromoSheetDefault from "openBountiesNuxPromoSheet" /* 15336 */;
import BountiesBannerBackgroundDefault from "BountiesBannerBackground" /* 15348 */;
import _modDef15349 from "module_15349" /* 15349 */;
import noop from "module_19" /* 19 */;
import AccessibilityStore from "AccessibilityStore" /* 4782 */;
import AdContentSeenStore from "AdContentSeenStore" /* 15346 */;
const require = globalThis.__r;
const Text_Text = Text(4786);
require = fn;
get_ActivityIndicator = fn(17);
({ StyleSheet: closure_4, View: hasOwnProperty } = get_ActivityIndicator);
const QuestConstants = fn(5695);
({ BountyCarouselEmptyStateReason: closure_8, DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID: closure_9 } = QuestConstants);
const jsxProd = fn(21);
({ jsx: c10, jsxs: closure_11 } = jsxProd);
const PX_16 = nativeDefault.space.PX_16;
const PX_20 = nativeDefault.space.PX_20;
const sum = 26 + nativeDefault.space.PX_8 + PX_16;
const minHeight = 472 - (sum + fn(5225).MEDIUM_BUTTON_HEIGHT + PX_20 + 170);
const createStyles = fn(4790);
let closure_16 = createStyles.createStyles(() => {
const obj = { container: { width: "100%", backgroundColor: nativeDefault.colors.BACKGROUND_SURFACE_HIGH, borderLeftWidth: 1, borderRightWidth: 1, borderBottomWidth: 1, borderColor: nativeDefault.colors.BORDER_MUTED, borderBottomLeftRadius: nativeDefault.radii.xxl, borderBottomRightRadius: nativeDefault.radii.xxl, overflow: "hidden" }, bannerClip: { overflow: "hidden" }, footerClip: null, header: null, headerWithFooter: null, headerReplaceMedia: null, headerTitleSection: null, headerHeadingGroup: null, headerHeadingContent: null, headerReplaceMediaCta: null, headerRoundedBottom: null, newPill: null, newPillInline: null, newPillText: null, headerTextBox: null, headerTextBoxWithFooter: null, description: null, footerCta: null };
const obj2 = { width: "100%", backgroundColor: nativeDefault.colors.BACKGROUND_SURFACE_HIGH, borderLeftWidth: 1, borderRightWidth: 1, borderBottomWidth: 1, borderColor: nativeDefault.colors.BORDER_MUTED, borderBottomLeftRadius: nativeDefault.radii.xxl, borderBottomRightRadius: nativeDefault.radii.xxl, overflow: "hidden" };
obj.footerClip = { overflow: "hidden", borderBottomLeftRadius: nativeDefault.radii.xxl, borderBottomRightRadius: nativeDefault.radii.xxl };
const obj3 = { overflow: "hidden", borderBottomLeftRadius: nativeDefault.radii.xxl, borderBottomRightRadius: nativeDefault.radii.xxl };
obj.header = { width: "100%", minHeight: 296, justifyContent: "flex-end", overflow: "hidden", backgroundColor: nativeDefault.colors.BACKGROUND_SURFACE_HIGH };
obj.headerWithFooter = { minHeight };
obj.headerReplaceMedia = { width: "100%", overflow: "hidden" };
const obj4 = { width: "100%", minHeight: 296, justifyContent: "flex-end", overflow: "hidden", backgroundColor: nativeDefault.colors.BACKGROUND_SURFACE_HIGH };
const obj5 = { minHeight };
obj.headerTitleSection = { paddingTop: nativeDefault.space.PX_12, paddingBottom: nativeDefault.space.PX_16, paddingHorizontal: nativeDefault.space.PX_20 };
const obj6 = { paddingTop: nativeDefault.space.PX_12, paddingBottom: nativeDefault.space.PX_16, paddingHorizontal: nativeDefault.space.PX_20 };
obj.headerHeadingGroup = { gap: nativeDefault.space.PX_24 };
const obj7 = { gap: nativeDefault.space.PX_24 };
obj.headerHeadingContent = { gap: nativeDefault.space.PX_4 };
obj.headerReplaceMediaCta = { paddingTop: PX_16, paddingBottom: PX_20, paddingHorizontal: PX_20 };
const obj8 = { gap: nativeDefault.space.PX_4 };
const obj9 = { paddingTop: PX_16, paddingBottom: PX_20, paddingHorizontal: PX_20 };
obj.headerRoundedBottom = { borderBottomLeftRadius: nativeDefault.radii.xxl, borderBottomRightRadius: nativeDefault.radii.xxl };
const rect = { position: "absolute", top: nativeDefault.space.PX_20, left: nativeDefault.space.PX_20, zIndex: 1, backgroundColor: nativeDefault.colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT, borderRadius: nativeDefault.radii.round, paddingHorizontal: nativeDefault.space.PX_8, paddingVertical: 2 };
obj.newPill = rect;
const obj10 = { borderBottomLeftRadius: nativeDefault.radii.xxl, borderBottomRightRadius: nativeDefault.radii.xxl };
obj.newPillInline = { alignSelf: "flex-start", backgroundColor: nativeDefault.colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT, borderRadius: nativeDefault.radii.round, paddingHorizontal: nativeDefault.space.PX_8, paddingVertical: 2 };
const obj11 = { alignSelf: "flex-start", backgroundColor: nativeDefault.colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT, borderRadius: nativeDefault.radii.round, paddingHorizontal: nativeDefault.space.PX_8, paddingVertical: 2 };
obj.newPillText = { color: nativeDefault.colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT };
const obj12 = { color: nativeDefault.colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT };
obj.headerTextBox = { paddingBottom: nativeDefault.space.PX_24, paddingHorizontal: nativeDefault.space.PX_20, gap: nativeDefault.space.PX_8 };
const obj13 = { paddingBottom: nativeDefault.space.PX_24, paddingHorizontal: nativeDefault.space.PX_20, gap: nativeDefault.space.PX_8 };
obj.headerTextBoxWithFooter = { paddingBottom: nativeDefault.space.PX_12 };
obj.description = { marginBottom: 16 };
const obj14 = { paddingBottom: nativeDefault.space.PX_12 };
obj.footerCta = { paddingTop: nativeDefault.space.PX_16, paddingBottom: nativeDefault.space.PX_20, paddingHorizontal: nativeDefault.space.PX_20 };
return obj;
});
let ReactCompilerGating = fn(558);
let closure_17 = ReactCompilerGating.isReactCompilerEnabled() ? (() => {
const cResult = c.c(5);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [AccessibilityStore];
const fn = function n() {
return useReducedMotion.useReducedMotion;
};
cResult[0] = items;
cResult[1] = fn;
tmp4 = items;
tmp5 = fn;
} else {
[tmp4, tmp5] = cResult;
}
const stateFromStores = initialize.useStateFromStores(tmp4, tmp5);
if (cResult[2] === Symbol.for("react.memo_cache_sentinel")) {
const obj2 = { uri: _modDef15327 };
cResult[2] = obj2;
let tmp8 = obj2;
} else {
tmp8 = cResult[2];
}
if (cResult[3] !== stateFromStores) {
const obj3 = { source: tmp8, style: React4.absoluteFillObject, resizeMode: "cover", muted: true, disableFocus: true, paused: stateFromStores, importantForAccessibility: "no-hide-descendants" };
const tmp13 = v65535(tmp(8615).VideoComponent, obj3);
cResult[3] = stateFromStores;
cResult[4] = tmp13;
let tmp10 = tmp13;
} else {
tmp10 = cResult[4];
}
return tmp10;
}) : (() => {
const items = [AccessibilityStore];
const stateFromStores = initialize.useStateFromStores(items, () => useReducedMotion.useReducedMotion);
const obj2 = { source: null, style: null, resizeMode: "cover", muted: true, disableFocus: true, paused: null, importantForAccessibility: "no-hide-descendants" };
obj2.source = { uri: _modDef15327 };
obj2.style = React4.absoluteFillObject;
obj2.paused = stateFromStores;
return v65535(common_Video.VideoComponent, obj2);
});
ReactCompilerGating = fn(558);
let closure_18 = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
const cResult = c.c(4);
({ variant, onPress } = arg0);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const intl = tmp(1119).intl;
const stringResult = intl.string(tmp(1119).t["1kkbKw"]);
cResult[0] = stringResult;
let first = stringResult;
} else {
first = cResult[0];
}
if (cResult[1] === onPress) {
if (cResult[2] === variant) {
let tmp6 = cResult[3];
}
return tmp6;
}
const tmp7 = v65535(components_Button_Button.Button, { grow: true, size: "md", variant, text: first, onPress });
cResult[1] = onPress;
cResult[2] = variant;
cResult[3] = tmp7;
tmp6 = tmp7;
}) : ((arg0) => {
({ variant, onPress } = arg0);
const obj = { grow: true, size: "md", variant, text: null, onPress: null };
const intl = util.intl;
obj.text = intl.string(util.t["1kkbKw"]);
obj.onPress = onPress;
return v65535(components_Button_Button.Button, obj);
});
ReactCompilerGating = fn(558);
let closure_19 = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
let Text = require;
let tmp = dependencyMap;
const cResult = c.c(12);
({ isEmptyOrCompleted, inlineLearnMore } = arg0);
const tmp4 = closure_16();
const t = util.t;
const tmp5 = isEmptyOrCompleted ? t.q4wlOE : t.AZGGo1;
let str = "text-subtle";
if (undefined !== inlineLearnMore && inlineLearnMore) {
str = "text-default";
}
if (cResult[0] !== tmp5) {
const intl = util.intl;
const stringResult = intl.string(tmp5);
cResult[0] = tmp5;
cResult[1] = stringResult;
let tmp6 = stringResult;
} else {
tmp6 = cResult[1];
}
if (cResult[2] === str) {
if (cResult[3] === tmp6) {
let tmp8 = cResult[4];
}
const _Symbol = Symbol;
if (cResult[5] === Symbol.for("react.memo_cache_sentinel")) {
const intl2 = util.intl;
const obj2 = { onClick: openBountiesNuxPromoSheetDefault };
const formatResult = intl2.format(util.t.fjSvsC, obj2);
cResult[5] = formatResult;
let tmp11 = formatResult;
} else {
tmp11 = cResult[5];
}
if (!isEmptyOrCompleted) {
if (!tmp3) {
const _Symbol2 = Symbol;
if (cResult[8] === Symbol.for("react.memo_cache_sentinel")) {
const obj3 = { variant: "text-sm/medium", children: tmp11 };
const tmp16 = v65535(Text_Text.Text, obj3);
cResult[8] = tmp16;
let tmp14 = tmp16;
} else {
tmp14 = cResult[8];
}
if (cResult[9] === tmp8) {
if (cResult[10] === tmp4.description) {
let tmp17 = cResult[11];
}
return tmp17;
}
const obj4 = { style: tmp4.description, children: null };
const items = [tmp8, tmp14];
obj4.children = items;
const tmp20 = closure_1_11(hasOwnProperty, obj4);
cResult[9] = tmp8;
cResult[10] = tmp4.description;
cResult[11] = tmp20;
tmp17 = tmp20;
}
}
if (cResult[6] !== tmp8) {
Text = Text_Text.Text;
const obj5 = { variant: "text-sm/medium", children: null };
const items1 = [tmp8, " ", tmp11];
obj5.children = items1;
tmp = closure_1_11(Text, obj5);
cResult[6] = tmp8;
cResult[7] = tmp;
}
}
const tmp9 = v65535(Text_Text.Text, { variant: "text-sm/medium", color: str, children: tmp6 });
cResult[2] = str;
cResult[3] = tmp6;
cResult[4] = tmp9;
tmp8 = tmp9;
}) : ((arg0) => {
({ isEmptyOrCompleted, inlineLearnMore } = arg0);
if (inlineLearnMore === undefined) {
inlineLearnMore = false;
}
const t = util.t;
if (isEmptyOrCompleted) {
let AZGGo1 = t.q4wlOE;
let tmp5 = tmp2;
} else {
AZGGo1 = t.AZGGo1;
tmp5 = tmp2;
}
let str = "text-subtle";
if (inlineLearnMore) {
str = "text-default";
}
const obj = { variant: "text-sm/medium", color: str, children: null };
const intl = tmp5(1119).intl;
obj.children = intl.string(AZGGo1);
const tmp7 = v65535(tmp5(4786).Text, obj);
const intl2 = tmp5(1119).intl;
const tmp = closure_16();
const tmp6 = v65535;
const formatResult = intl2.format(tmp5(1119).t.fjSvsC, { onClick: openBountiesNuxPromoSheetDefault });
if (!isEmptyOrCompleted) {
if (!inlineLearnMore) {
const obj3 = { style: tmp.description, children: null };
const items = [tmp7, ];
const obj4 = { variant: "text-sm/medium", children: formatResult };
items[1] = tmp6(tmp5(4786).Text, obj4);
obj3.children = items;
let tmp11 = closure_1_11(hasOwnProperty, obj3);
}
return tmp11;
}
const obj5 = { variant: "text-sm/medium", children: null };
const items1 = [tmp7, " ", formatResult];
obj5.children = items1;
tmp11 = closure_1_11(tmp5(4786).Text, obj5);
});
ReactCompilerGating = fn(558);
let closure_20 = ReactCompilerGating.isReactCompilerEnabled() ? ((bounties) => {
let tmp = bounties;
let items4 = dependencyMap;
const cResult = bounties(568).c(48);
bounties = bounties.bounties;
({ isEmptyOrCompleted, containerRef, footer, replaceHeaderMediaWith, shopCarouselButtonVariant } = bounties);
let str = "default";
if (undefined !== shopCarouselButtonVariant) {
str = shopCarouselButtonVariant;
}
const tmp4 = closure_16();
if (cResult[0] !== str) {
const bountiesEntryPointButtonVariant = tmp(15347).getBountiesEntryPointButtonVariant(str);
cResult[0] = str;
cResult[1] = bountiesEntryPointButtonVariant;
let tmp7 = bountiesEntryPointButtonVariant;
const tmpResult = tmp(15347);
} else {
tmp7 = cResult[1];
}
if (cResult[2] === Symbol.for("react.memo_cache_sentinel")) {
const items = [AdContentSeenStore];
cResult[2] = items;
let tmp9 = items;
} else {
tmp9 = cResult[2];
}
if (cResult[3] !== bounties) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
const items1 = [bounties];
cResult[3] = bounties;
cResult[4] = I;
cResult[5] = items1;
let tmp12 = items1;
const tmp11 = I;
} else {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
tmp12 = cResult[5];
}
let obj = bounties(568);
newPillText = tmp(504).useStateFromStores(tmp9, tmp11, tmp12);
if (cResult[6] !== bounties[0]) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
cResult[6] = bounties[0];
cResult[7] = tmp14;
} else {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
}
if (null == footer) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
}
if (cResult[8] === tmp4.bannerClip) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
if (cResult[11] === tmp7) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
}
if (null != replaceHeaderMediaWith) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
const items2 = [tmp4.headerReplaceMedia, ];
if (!tmp5) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
}
let obj2 = { style: null, children: null };
items2[1] = tmp15;
obj2.style = items2;
const items3 = [closure_10(closure_17, {}), , , ];
let obj3 = { style: tmp4.headerTitleSection, children: null };
const obj5 = { style: tmp4.headerHeadingGroup, children: null };
let tmp29Result = newPillText;
if (newPillText) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
({ newPillInline: tmp32[1], newPillText: tmp32[2] } = tmp4);
tmp29Result = tmp29(tmp(1181).NewTag, tmp32);
}
items4 = [tmp29Result, ];
const obj6 = { style: tmp4.headerHeadingContent, children: null };
const obj7 = { isEmptyOrCompleted: tmp3, inlineLearnMore: true };
tmp = tmp29(closure_19, obj7);
obj6.children = tmp;
items4[1] = closure_10(closure_5, obj6);
obj5.children = items4;
obj3.children = tmp26(closure_5, obj5);
items3[1] = closure_10(closure_5, obj3);
items3[2] = replaceHeaderMediaWith;
let tmp29Result2 = tmp6;
if (!tmp3) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
}
if (tmp29Result2) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
tmp35[0] = tmp4.headerReplaceMediaCta;
const obj8 = { variant: tmp7, onPress: tmp13 };
items4 = tmp29(closure_18, obj8);
tmp35[1] = items4;
tmp29Result2 = tmp29(tmp27, tmp35);
}
items3[3] = tmp29Result2;
obj2.children = items3;
let tmp38Result = tmp26(tmp27, obj2);
} else {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
const obj9 = { uri: _modDef15349, style: null, children: null };
const items5 = [tmp4.header, , ];
if (tmp5) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
}
items5[1] = tmp5;
if (!tmp5) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
}
items5[2] = tmp15;
obj9.style = items5;
let tmp19 = newPillText;
if (newPillText) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
({ newPill: obj4.containerStyle, newPillText: obj4.textStyle } = tmp4);
tmp19 = closure_10(tmp(1181).NewTag, { variant: "text-xs/bold", containerStyle: null, textStyle: null });
const obj10 = { variant: "text-xs/bold", containerStyle: null, textStyle: null };
}
const items6 = [tmp19, ];
const items7 = [tmp4.headerTextBox, ];
if (tmp5) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
}
const obj11 = { style: null, children: null };
items7[1] = tmp5;
obj11.style = items7;
const obj12 = { isEmptyOrCompleted: tmp3 };
const items8 = [closure_10(closure_19, obj12), ];
let tmp22Result = tmp6;
if (!tmp3) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
}
if (tmp22Result) {
class I {
constructor() {
return bounties.some(() => { ... });
}
}
const obj13 = { variant: tmp7, onPress: tmp13 };
tmp22Result = tmp22(closure_18, obj13);
}
items8[1] = tmp22Result;
obj11.children = items8;
items6[1] = tmp38(closure_5, obj11);
obj9.children = items6;
tmp38Result = tmp38(BountiesBannerBackgroundDefault, obj9);
tmp22 = closure_10;
}
cResult[11] = tmp7;
cResult[12] = tmp13;
cResult[13] = tmp5;
cResult[14] = tmp3;
cResult[15] = replaceHeaderMediaWith;
cResult[16] = newPillText;
cResult[17] = tmp6;
cResult[18] = tmp4.header;
cResult[19] = tmp4.headerHeadingContent;
cResult[20] = tmp4.headerHeadingGroup;
cResult[21] = tmp4.headerReplaceMedia;
cResult[22] = tmp4.headerReplaceMediaCta;
cResult[23] = tmp4.headerRoundedBottom;
cResult[24] = tmp4.headerTextBox;
cResult[25] = tmp4.headerTextBoxWithFooter;
cResult[26] = tmp4.headerTitleSection;
cResult[27] = tmp4.headerWithFooter;
cResult[28] = tmp4.newPill;
({ newPillInline: tmp2[29], newPillText } = tmp4);
cResult[30] = newPillText;
cResult[31] = tmp38Result;
}
const items9 = [tmp4.bannerClip, null == footer];
cResult[8] = tmp4.bannerClip;
cResult[9] = null == footer;
cResult[10] = items9;
}) : ((bounties) => {
bounties = bounties.bounties;
let flag = bounties.isEmptyOrCompleted;
if (flag === undefined) {
flag = false;
}
({ footer, replaceHeaderMediaWith, shopCarouselButtonVariant, containerRef } = bounties);
if (shopCarouselButtonVariant === undefined) {
shopCarouselButtonVariant = "default";
}
const tmp = closure_16();
let tmp9Result2 = null != footer;
let tmp11Result6 = !flag;
const bountiesEntryPointButtonVariant = bounties(15347).getBountiesEntryPointButtonVariant(shopCarouselButtonVariant);
let obj = bounties(15347);
const items = [AdContentSeenStore];
const items1 = [bounties];
let stateFromStores = bounties(504).useStateFromStores(items, () => bounties.some((id) => !closure_1_7.hasSeen(bounties(closure_1_2[19]).AdCreativeType.BOUNTY, id.id)), items1);
const items2 = [bounties];
const callback = noop.useCallback(() => {
const obj = AnalyticsActions;
const result = obj.trackAdContentClicked({ adContentId, adCreativeType: AdCreativeType.AdCreativeType.BOUNTY, questContent: QuestTypes.QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE, questContentCTA: AnalyticsTypes.QuestContentCTA.START_BOUNTY, sourceQuestContent: QuestTypes.QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE, questContentPosition: 0 });
const obj2 = { adContentId, adCreativeType: AdCreativeType.AdCreativeType.BOUNTY, questContent: QuestTypes.QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE, questContentCTA: AnalyticsTypes.QuestContentCTA.START_BOUNTY, sourceQuestContent: QuestTypes.QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE, questContentPosition: 0 };
const obj3 = BountiesModalActionCreatorsDefault;
obj3.showModal({ bountyId: bounties[0].id, sourceQuestContent: QuestTypes.QuestContent.VIDEO_MODAL_MOBILE, variant: BountiesModalTypes.BountiesModalVariant.VERTICAL_SCROLL });
}, items2);
let obj3 = { ref: containerRef, style: tmp.container, children: null };
const items3 = [tmp.bannerClip, ];
let headerRoundedBottom = tmp12;
if (!tmp9Result2) {
headerRoundedBottom = tmp.headerRoundedBottom;
}
const obj4 = { style: items3, children: null };
items3[1] = headerRoundedBottom;
if (null != replaceHeaderMediaWith) {
const items4 = [tmp.headerReplaceMedia, ];
let headerRoundedBottom3 = tmp12;
if (!tmp9Result2) {
headerRoundedBottom3 = tmp.headerRoundedBottom;
}
const obj6 = { style: null, children: null };
items4[1] = headerRoundedBottom3;
obj6.style = items4;
const items5 = [tmp11(closure_17, {}), , , ];
const obj7 = { style: tmp.headerTitleSection, children: null };
const obj8 = { style: tmp.headerHeadingGroup, children: null };
if (stateFromStores) {
({ newPillInline: obj12.containerStyle, newPillText: obj12.textStyle } = tmp);
stateFromStores = tmp11(tmp4(1181).NewTag, { variant: "text-xs/bold", containerStyle: null, textStyle: null });
const obj9 = { variant: "text-xs/bold", containerStyle: null, textStyle: null };
}
const items6 = [stateFromStores, ];
const obj10 = { style: tmp.headerHeadingContent, children: null };
const obj11 = { isEmptyOrCompleted: flag, inlineLearnMore: true };
obj10.children = tmp11(closure_19, obj11);
items6[1] = tmp11(tmp10, obj10);
obj8.children = items6;
obj7.children = tmp9(tmp10, obj8);
items5[1] = tmp11(tmp10, obj7);
items5[2] = replaceHeaderMediaWith;
let tmp11Result = tmp11Result6;
if (!flag) {
tmp11Result = tmp12;
}
if (tmp11Result) {
const obj13 = { style: tmp.headerReplaceMediaCta, children: null };
const obj14 = { variant: bountiesEntryPointButtonVariant, onPress: callback };
obj13.children = tmp11(closure_18, obj14);
tmp11Result = tmp11(tmp10, obj13);
}
items5[3] = tmp11Result;
obj6.children = items5;
let tmp9Result = tmp9(tmp10, obj6);
} else {
const obj15 = { uri: _modDef15349, style: null, children: null };
const items7 = [tmp.header, , ];
let headerWithFooter = tmp9Result2;
if (tmp9Result2) {
headerWithFooter = tmp.headerWithFooter;
}
items7[1] = headerWithFooter;
let headerRoundedBottom2 = tmp12;
if (!tmp9Result2) {
headerRoundedBottom2 = tmp.headerRoundedBottom;
}
items7[2] = headerRoundedBottom2;
obj15.style = items7;
let tmp11Result4 = stateFromStores;
if (stateFromStores) {
({ newPill: obj5.containerStyle, newPillText: obj5.textStyle } = tmp);
tmp11Result4 = tmp11(tmp4(1181).NewTag, { variant: "text-xs/bold", containerStyle: null, textStyle: null });
const obj16 = { variant: "text-xs/bold", containerStyle: null, textStyle: null };
}
const items8 = [tmp11Result4, ];
const items9 = [tmp.headerTextBox, ];
let headerTextBoxWithFooter = tmp9Result2;
if (tmp9Result2) {
headerTextBoxWithFooter = tmp.headerTextBoxWithFooter;
}
const obj17 = { style: null, children: null };
items9[1] = headerTextBoxWithFooter;
obj17.style = items9;
const obj18 = { isEmptyOrCompleted: flag };
const items10 = [tmp11(closure_19, obj18), ];
let tmp11Result5 = tmp11Result6;
if (!flag) {
tmp11Result5 = tmp12;
}
if (tmp11Result5) {
const obj19 = { variant: bountiesEntryPointButtonVariant, onPress: callback };
tmp11Result5 = tmp11(closure_18, obj19);
}
items10[1] = tmp11Result5;
obj17.children = items10;
items8[1] = tmp9(tmp10, obj17);
obj15.children = items8;
tmp9Result = tmp9(BountiesBannerBackgroundDefault, obj15);
}
obj4.children = tmp9Result;
const items11 = [closure_10(closure_5, obj4), ];
if (tmp9Result2) {
const obj20 = { style: tmp.footerClip, children: null };
const items12 = [tmp11(closure_17, {}), footer, ];
if (!flag) {
const obj38 = { style: tmp.footerCta, children: null };
const obj39 = { variant: bountiesEntryPointButtonVariant, onPress: callback };
obj38.children = tmp11(closure_18, obj39);
tmp11Result6 = tmp11(tmp10, obj38);
}
items12[2] = tmp11Result6;
obj20.children = items12;
tmp9Result2 = tmp9(tmp10, obj20);
}
items11[1] = tmp9Result2;
obj3.children = items11;
return closure_11(closure_5, obj3);
});
ReactCompilerGating = fn(558);
const size = fn(2);
let result = size.fileFinishedImporting("modules/quests/native/BountiesCtaHeader.tsx");
export default noop.memo(ReactCompilerGating.isReactCompilerEnabled() ? ((isEmptyOrCompleted) => {
_require = isEmptyOrCompleted;
const cResult = require("c").c(5);
const tmp4 = containerRef(15350)();
containerRef = tmp4.containerRef;
const isInView = tmp4.isInView;
isEmptyOrCompleted = isEmptyOrCompleted.isEmptyOrCompleted;
let tmp5 = undefined !== isEmptyOrCompleted;
if (tmp5) {
tmp5 = isEmptyOrCompleted;
}
if (!tmp5) {
const bountyCarouselEmptyStateAnalytics = tmp(11938).useBountyCarouselEmptyStateAnalytics(null);
if (cResult[0] === containerRef) {
if (cResult[1] === tmp5) {
if (cResult[2] === isInView) {
if (cResult[3] === isEmptyOrCompleted) {
return cResult[4];
}
}
}
}
let obj2 = { theme: tmp(15330).ThemeTypes.DARK, children: null };
if (tmp5) {
const obj3 = {};
let merged = Object.assign(isEmptyOrCompleted);
obj3.containerRef = containerRef;
let tmp10Result = tmp10(closure_20, obj3);
} else {
const obj4 = {
adContentId,
adCreativeType: tmp(5702).AdCreativeType.BOUNTY,
questContent: tmp(5698).QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE,
questContentPosition: 0,
overrideVisibility: isInView,
sourceQuestContent: tmp(5698).QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE,
children() {
const obj = {};
const merged = Object.assign(closure_0);
obj.containerRef = containerRef;
return v65535(closure_20, obj);
}
};
tmp10Result = tmp10(tmp(11942).QuestContentImpressionTrackerNative, obj4);
}
obj2.children = tmp10Result;
obj2 = tmp10(tmp(4503).ThemeContextProvider, obj2);
cResult[0] = containerRef;
cResult[1] = tmp5;
cResult[2] = isInView;
cResult[3] = isEmptyOrCompleted;
cResult[4] = obj2;
const tmpResult = tmp(11938);
} else if (0 === isEmptyOrCompleted.bounties.length) {
let COMPLETED = constants.EMPTY;
} else {
COMPLETED = constants.COMPLETED;
}
}) : ((isEmptyOrCompleted) => {
_require = isEmptyOrCompleted;
const tmp2 = containerRef(15350)();
containerRef = tmp2.containerRef;
isEmptyOrCompleted = isEmptyOrCompleted.isEmptyOrCompleted;
let tmp3 = undefined !== isEmptyOrCompleted;
if (tmp3) {
tmp3 = isEmptyOrCompleted;
}
if (!tmp3) {
const bountyCarouselEmptyStateAnalytics = require("AnalyticsHooks").useBountyCarouselEmptyStateAnalytics(null);
const obj2 = { theme: require("shared/ThemeTypes").ThemeTypes.DARK, children: null };
if (tmp3) {
const obj3 = {};
let merged = Object.assign(isEmptyOrCompleted);
obj3.containerRef = containerRef;
let tmp9Result = tmp9(closure_20, obj3);
} else {
const obj4 = {
adContentId,
adCreativeType: tmp7(5702).AdCreativeType.BOUNTY,
questContent: tmp7(5698).QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE,
questContentPosition: 0,
overrideVisibility: tmp2.isInView,
sourceQuestContent: tmp7(5698).QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE,
children() {
const obj = {};
const merged = Object.assign(closure_0);
obj.containerRef = containerRef;
return v65535(closure_20, obj);
}
};
tmp9Result = tmp9(tmp7(11942).QuestContentImpressionTrackerNative, obj4);
}
obj2.children = tmp9Result;
return closure_10(require("native").ThemeContextProvider, obj2);
} else if (0 === isEmptyOrCompleted.bounties.length) {
let COMPLETED = constants.EMPTY;
} else {
COMPLETED = constants.COMPLETED;
}
}));