Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
110 lines
6.1 KiB
TypeScript
110 lines
6.1 KiB
TypeScript
// Module ID: 15230
|
|
// Function ID: 15231
|
|
// Name: QuestDockInsetHeaderBody
|
|
// Dependencies: [19, 17, 15125, 21, 576, 4574, 11802, 11801, 15122, 1611, 15194, 15191, 4570, 1178, 2]
|
|
// Exports: QuestDockBodyQuestRewardTile, QuestDockBodyRewardTile
|
|
|
|
// Module 15230 (QuestDockInsetHeaderBody)
|
|
import nativeDefault from "native" /* 576 */;
|
|
import native from "native" /* 1178 */;
|
|
import useSafeAreaInsetsDefault from "useSafeAreaInsets" /* 1611 */;
|
|
import Text_Text from "Text/Text" /* 4570 */;
|
|
import QuestRewardTileDefault from "QuestRewardTile" /* 11801 */;
|
|
import QuestDockRewardTileDefault from "QuestDockRewardTile" /* 11802 */;
|
|
import QuestDockHooks from "QuestDockHooks" /* 15122 */;
|
|
import QuestDockBlurredContentBackgroundDefault from "QuestDockBlurredContentBackground" /* 15191 */;
|
|
import PremiumRewardGradientDefault from "PremiumRewardGradient" /* 15194 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = fn;
|
|
const View = fn(17).View;
|
|
const QuestDockConstants = fn(15125);
|
|
const QUEST_DOCK_EXPANDED_PADDING_BOTTOM = QuestDockConstants.QUEST_DOCK_EXPANDED_PADDING_BOTTOM;
|
|
const jsxProd = fn(21);
|
|
({ jsx: hasOwnProperty, jsxs: metroRequire } = jsxProd);
|
|
const PX_80 = nativeDefault.space.PX_80;
|
|
const createStyles = fn(4574);
|
|
let obj = { rewardTile: { borderRadius: nativeDefault.radii.lg }, wrapper: { flexGrow: 1, flexShrink: 0, justifyContent: "flex-end", paddingHorizontal: QuestDockConstants.QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL, paddingBottom: QUEST_DOCK_EXPANDED_PADDING_BOTTOM }, rewardContentWrapper: null, rewardContent: null, rewardContentCopy: null, premiumRewardPerkPill: null, titleRow: null, questDockCtaWrapper: null, questDockCta: null, questDockCtaRow: null, questDockCtaSaparator: null };
|
|
let obj3 = { borderRadius: nativeDefault.radii.lg };
|
|
obj.rewardContentWrapper = { borderRadius: nativeDefault.modules.mobile.QUEST_DOCK_BORDER_RADIUS, overflow: "hidden", padding: 8, paddingRight: 16 };
|
|
obj.rewardContent = { alignItems: "center", flexDirection: "row", gap: 16 };
|
|
obj.rewardContentCopy = { flexGrow: 1, flexShrink: 1, gap: 4 };
|
|
obj.premiumRewardPerkPill = { alignSelf: "flex-start" };
|
|
let obj4 = { borderRadius: nativeDefault.modules.mobile.QUEST_DOCK_BORDER_RADIUS, overflow: "hidden", padding: 8, paddingRight: 16 };
|
|
obj.titleRow = { flexDirection: "row", alignItems: "center", gap: nativeDefault.space.PX_8, flexWrap: "wrap" };
|
|
obj.questDockCtaWrapper = { marginTop: 12, paddingHorizontal: 4, paddingTop: 16, position: "relative" };
|
|
let obj5 = { flexDirection: "row", alignItems: "center", gap: nativeDefault.space.PX_8, flexWrap: "wrap" };
|
|
obj.questDockCta = { borderRadius: nativeDefault.radii.round };
|
|
obj.questDockCtaRow = { alignSelf: "stretch" };
|
|
const rect = { position: "absolute", left: -12, right: -12, top: 0, backgroundColor: nativeDefault.colors.BORDER_SUBTLE, height: 1, opacity: 1 };
|
|
obj.questDockCtaSaparator = rect;
|
|
let closure_8 = createStyles.createStyles(obj);
|
|
let obj6 = { borderRadius: nativeDefault.radii.round };
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/quests/native/QuestDock/QuestDockInsetHeaderBody.tsx");
|
|
|
|
export default noop.memo(function QuestDockInsetHeaderBody(showBonusOrbsGradient) {
|
|
({ premiumRewardPerkPill, ctaLoading } = showBonusOrbsGradient);
|
|
({ rewardTile, title, description, ctaText, onCtaPress, renderCtaIcon } = showBonusOrbsGradient);
|
|
if (ctaLoading === undefined) {
|
|
ctaLoading = false;
|
|
}
|
|
let flag = showBonusOrbsGradient.showBonusOrbsGradient;
|
|
if (flag === undefined) {
|
|
flag = false;
|
|
}
|
|
const tmp = closure_8();
|
|
const isQuestDockExpanded = QuestDockHooks.useIsQuestDockExpanded();
|
|
const obj2 = { visible: flag, glow: true, style: null, children: null };
|
|
const items = [tmp.wrapper, ];
|
|
const obj3 = { paddingBottom: null };
|
|
obj3.paddingBottom = Math.max(useSafeAreaInsetsDefault().bottom, QUEST_DOCK_EXPANDED_PADDING_BOTTOM);
|
|
items[1] = obj3;
|
|
obj2.style = items;
|
|
const obj4 = { style: tmp.rewardContentWrapper, children: null };
|
|
const items1 = [hasOwnProperty(QuestDockBlurredContentBackgroundDefault, {}), ];
|
|
const obj5 = { style: tmp.rewardContent, children: null };
|
|
const items2 = [rewardTile, ];
|
|
const obj6 = { style: tmp.rewardContentCopy, children: null };
|
|
let tmp8Result = null != premiumRewardPerkPill;
|
|
if (tmp8Result) {
|
|
const obj7 = { style: tmp.premiumRewardPerkPill, children: premiumRewardPerkPill };
|
|
tmp8Result = tmp8(tmp7, obj7);
|
|
}
|
|
const items3 = [tmp8Result, , ];
|
|
const tmp6 = PremiumRewardGradientDefault;
|
|
items3[1] = hasOwnProperty(View, { style: tmp.titleRow, children: hasOwnProperty(Text_Text.Text, { variant: "heading-md/medium", color: "mobile-text-heading-primary", children: title }) });
|
|
items3[2] = hasOwnProperty(Text_Text.Text, { color: "text-default", variant: "text-sm/normal", children: description });
|
|
obj6.children = items3;
|
|
items2[1] = timestampProducer(View, obj6);
|
|
obj5.children = items2;
|
|
items1[1] = timestampProducer(View, obj5);
|
|
obj4.children = items1;
|
|
const items4 = [timestampProducer(View, obj4), ];
|
|
const obj9 = { style: tmp.questDockCtaWrapper, children: null };
|
|
const items5 = [hasOwnProperty(View, { style: tmp.questDockCtaSaparator }), ];
|
|
const obj11 = { style: tmp.questDockCtaRow, children: hasOwnProperty(native.ShinyButton, { style: tmp.questDockCta, onPress: onCtaPress, loading: ctaLoading, renderIcon: renderCtaIcon, text: ctaText, shineDisabled: !isQuestDockExpanded }) };
|
|
items5[1] = hasOwnProperty(View, obj11);
|
|
obj9.children = items5;
|
|
items4[1] = timestampProducer(View, obj9);
|
|
obj2.children = items4;
|
|
return timestampProducer(tmp6, obj2);
|
|
});
|
|
export const QuestDockBodyRewardTile = function QuestDockBodyRewardTile(arg0) {
|
|
const obj = {};
|
|
const tmp = closure_8();
|
|
const merged = Object.assign(arg0);
|
|
obj.height = PX_80;
|
|
obj.width = PX_80;
|
|
obj.style = tmp.rewardTile;
|
|
return hasOwnProperty(QuestDockRewardTileDefault, obj);
|
|
};
|
|
export const QuestDockBodyQuestRewardTile = function QuestDockBodyQuestRewardTile(arg0) {
|
|
const obj = {};
|
|
const tmp = closure_8();
|
|
const merged = Object.assign(arg0);
|
|
obj.height = PX_80;
|
|
obj.width = PX_80;
|
|
obj.style = tmp.rewardTile;
|
|
return hasOwnProperty(QuestRewardTileDefault, obj);
|
|
};
|