137 lines
8.4 KiB
TypeScript
137 lines
8.4 KiB
TypeScript
/* Metro module 9482; source: modules/quests/native/QuestRewardDetailsBottomSheet.native.tsx; dependencies: [31, 27, 1878, 33, 4501, 697, 9480, 4080, 9483, 9500, 7098, 1244, 566, 6275, 4572, 9542, 4573, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
|
|
import QuestRewardTile from './QuestRewardTile.tsx'; /* Metro dependency 9542 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as StackNativeModule from '../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
import * as QuestRewardTypesModule from '../../../external/discord_common/js/shared/shared-constants/QuestRewardTypes.tsx'; /* Metro dependency 7098 */
|
|
import * as QuestUtilsNativeModule from './QuestUtils.native.tsx'; /* Metro dependency 9480 */
|
|
import * as QuestHooksModule from '../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
|
|
import * as QuestRewardUtilsModule from '../utils/QuestRewardUtils.tsx'; /* Metro dependency 9500 */
|
|
|
|
function _fun73739(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:6, offset: 0x01d7654a, size: 341 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.jsxs;
|
|
const env0_8 = value.Fragment;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {};
|
|
const PX_16 = (Native).space.PX_16;
|
|
object2.paddingHorizontal = PX_16;
|
|
const PX_8 = (Native).space.PX_8;
|
|
object2.paddingBottom = PX_8;
|
|
object.wrapper = object2;
|
|
object.rewardDetailsCopy = {flexShrink: 1};
|
|
const BORDER_STRONG = (Native).colors.BORDER_STRONG;
|
|
object.separator = {height: 1, backgroundColor: BORDER_STRONG};
|
|
const env0_9 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestRewardDetailsBottomSheet.native.tsx');
|
|
exports.default = QuestRewardDetailsBottomSheetConnected;
|
|
function QuestRewardDetailsBottomSheet({quest}) { // fn#73740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:377, offset: 0x01d7669f, size: 776 bytes, params: 2, frame: 36
|
|
const styles = useStyles();
|
|
const value3 = ReactModule.useMemo(_fun73742, [quest, ReactModule.useMemo(_fun73741, [quest.config])]);
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const defaultRewardName = (QuestRewardUtilsModule).getDefaultRewardName(quest.config,
|
|
currentUser);
|
|
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
|
|
const Stack = (StackNativeModule).Stack;
|
|
const object2 = {direction: 'vertical'};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.spacing = PX_16;
|
|
object2.style = styles.wrapper;
|
|
const Stack2 = (StackNativeModule).Stack;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
const value5 = ((Component) => <Component quest={quest} height={56} width={56} withAnimation />)(QuestRewardTile);
|
|
const Stack3 = (StackNativeModule).Stack;
|
|
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
const Text = (TextModule).Text;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
return (
|
|
<BottomSheet startExpanded>
|
|
<Stack {...object2}>
|
|
<Stack2
|
|
align="center"
|
|
direction="horizontal"
|
|
spacing={PX_16}
|
|
>
|
|
{value5}
|
|
<Stack3
|
|
direction="vertical"
|
|
spacing={PX_4}
|
|
style={styles.rewardDetailsCopy}
|
|
>
|
|
<Text variant="eyebrow" color="text-subtle">
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['jyYgZ+'])}
|
|
</Text>
|
|
<Text variant="heading-lg/semibold" color="text-strong">
|
|
{defaultRewardName}
|
|
</Text>
|
|
</Stack3>
|
|
</Stack2>
|
|
{value3 != null && <><View style={styles.separator} /><Text variant="text-md/normal" color="text-subtle">{value3}</Text></>}
|
|
</Stack>
|
|
</BottomSheet>
|
|
);
|
|
function _fun73741() { // fn#73741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:450, offset: 0x01d769a7, size: 51 bytes, params: 1, frame: 11
|
|
let value = environment.__proto__;
|
|
value = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
|
return value.isCollectibleQuestRewardPremiumExtendable(quest.config);
|
|
}
|
|
|
|
function _fun73742() { // fn#73742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:540, offset: 0x01d769da, size: 256 bytes, params: 1, frame: 16
|
|
const intl = (IndexNativeModule).intl;
|
|
const t = (IndexNativeModule).t;
|
|
const getQuestPrimaryReward = QuestRewardUtilsModule.getQuestPrimaryReward;
|
|
const type = Reflect.apply(getQuestPrimaryReward, QuestRewardUtilsModule, [quest]).type;
|
|
const QuestRewardTypes = (QuestRewardTypesModule).QuestRewardTypes;
|
|
const COLLECTIBLE = QuestRewardTypes.COLLECTIBLE;
|
|
if (COLLECTIBLE === type) {
|
|
return intl.string(env0_1 ? t['66YyBJ'] : t.ABD2CN);
|
|
}
|
|
const FRACTIONAL_PREMIUM = QuestRewardTypes.FRACTIONAL_PREMIUM;
|
|
if (FRACTIONAL_PREMIUM === type) {
|
|
return intl.string(t.maMtqM);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
}
|
|
|
|
function QuestRewardDetailsBottomSheetConnected({questId}) { // fn#73744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:1772, offset: 0x01d76ada, size: 106 bytes, params: 2, frame: 15
|
|
const value3 = (QuestHooksModule).useNonNullableQuest(questId,
|
|
ReactModule.useCallback(_fun73745, []));
|
|
return (
|
|
value3 == null
|
|
? null
|
|
: (
|
|
<QuestRewardDetailsBottomSheet quest={value3} />
|
|
)
|
|
);
|
|
function _fun73745() { // fn#73745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:1854, offset: 0x01d76b44, size: 63 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
(QuestUtilsNativeModule).showQuestUnavailableAlert();
|
|
(ActionSheetActionCreators).hideActionSheet();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun73739, 9482, [31, 27, 1878, 33, 4501, 697, 9480, 4080, 9483, 9500, 7098, 1244, 566, 6275, 4572, 9542,
|
|
4573,
|
|
2]) /* metro module 9482, dependencies: [31, 27, 1878, 33, 4501, 697, 9480, 4080, 9483, 9500, 7098, 1244, 566, 6275, 4572, 9542, 4573, 2] */;
|