153 lines
8.9 KiB
TypeScript
153 lines
8.9 KiB
TypeScript
/* Metro module 13582; source: modules/quests/native/QuestDisclosureModal/QuestDisclosureModalInner.tsx; dependencies: [27, 661, 33, 4501, 697, 3829, 9390, 1244, 9404, 11441, 8658, 5473, 4573, 9505, 6239, 6766, 1948, 4578, 2] */
|
|
import HelpdeskUtils from '../../../../utils/HelpdeskUtils.tsx'; /* Metro dependency 1948 */
|
|
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 JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as UserSettingsModule from '../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as NativeModule from '../../../../design/assets/native.tsx'; /* Metro dependency 5473 */
|
|
import * as TextWithIOSLinkWorkaroundModule from '../../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
|
|
import * as QuestCopyUtilsModule from '../../utils/QuestCopyUtils.tsx'; /* Metro dependency 9505 */
|
|
|
|
function _fun103231(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13772:6, offset: 0x0225d8bc, size: 534 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {flex: 1};
|
|
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object2.padding = PX_24;
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.gap = PX_16;
|
|
object2.maxWidth = 480;
|
|
object.container = object2;
|
|
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.illustration = {alignSelf: 'center', marginBottom: PX_8};
|
|
const object4 = {marginTop: 'auto'};
|
|
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object4.paddingHorizontal = PX_8;
|
|
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object4.marginBottom = PX_24;
|
|
object.closeButton = object4;
|
|
object.targetList = {padding: 0};
|
|
const object6 = {'flexDirection': 'row', 'flexWrap': 'nowrap', 'alignItems': 'center'};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object6.paddingLeft = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object6.gap = PX_16;
|
|
object.targetItem = object6;
|
|
object.lastTargetItem = {borderBottomWidth: 0};
|
|
const object8 = {'flex': 1, 'paddingVertical': null, 'borderBottomWidth': 1};
|
|
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object8.paddingVertical = PX_12;
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object8.borderBottomColor = BORDER_SUBTLE;
|
|
object.disclosureText = object8;
|
|
const env0_7 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDisclosureModal/QuestDisclosureModalInner.tsx');
|
|
exports.default = QuestDisclosureModalInner;
|
|
function QuestDisclosureModalInner({isTargetedDisclosure, gamePublisher, gameTitle, isVideoQuest, onClose, cosponsorName}) { // fn#103232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13772:873, offset: 0x0225dad2, size: 1061 bytes, params: 2, frame: 31
|
|
var r14;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var items2;
|
|
const styles = useStyles();
|
|
const DropsOptedOut = (UserSettingsModule).DropsOptedOut;
|
|
const value2 = DropsOptedOut.useSetting();
|
|
let object = {};
|
|
if (value2) {
|
|
object.icon = ((ServerIcon) => <ServerIcon size="xs" />)((require(9390) /* metro dependency 9390: ServerIcon */).ServerIcon);
|
|
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2bL0wT']);
|
|
r14 = [object];
|
|
} else {
|
|
object.icon = ((GlobeEarthIcon) => <GlobeEarthIcon size="xs" />)((require(9404) /* metro dependency 9404: GlobeEarthIcon */).GlobeEarthIcon);
|
|
object.text = intl.string(t.xQSdPv);
|
|
items2 = [object];
|
|
object = {};
|
|
object.icon = ((UserIcon) => <UserIcon size="xs" />)((require(11441) /* metro dependency 11441: UserIcon */).UserIcon);
|
|
object.text = intl.string(t.mYt7hQ);
|
|
items2[1] = object;
|
|
object = {};
|
|
object.icon = ((GameControllerIcon) => <GameControllerIcon size="xs" />)((require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon);
|
|
object.text = intl.string(t.XAsWxQ);
|
|
items2[2] = object;
|
|
r14 = items2;
|
|
}
|
|
const WumpusCouchSpotIllustration = (NativeModule).WumpusCouchSpotIllustration;
|
|
const items3 = [
|
|
<View style={styles.illustration}>
|
|
<WumpusCouchSpotIllustration />
|
|
</View>,
|
|
];
|
|
const Text = (TextModule).Text;
|
|
const getDisclosureText = QuestCopyUtilsModule.getDisclosureText;
|
|
items3[1] = (
|
|
<Text variant="text-md/normal" color="mobile-text-heading-primary">
|
|
{Reflect.apply(getDisclosureText, QuestCopyUtilsModule, [{gamePublisher: gamePublisher,
|
|
gameTitle: gameTitle, isTargetedDisclosure: isTargetedDisclosure, isContextualDisclosure: value2,
|
|
cosponsorName: cosponsorName, isVideoQuest: isVideoQuest}])}
|
|
</Text>
|
|
);
|
|
items3[2] = isTargetedDisclosure && ((Card) => <Card radius={16} style={styles.targetList}>{r14.map(_fun103233)}</Card>)((require(6239) /* metro dependency 6239: CardNative */).Card);
|
|
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
|
|
const format = intl.format;
|
|
const tzq9Wa = (require(1244) /* metro dependency 1244: indexNative */).t.tzq9Wa;
|
|
const defaultImport = HelpdeskUtils;
|
|
const getArticleURL = defaultImport.getArticleURL;
|
|
const QUESTS_PRIVACY_CONTROLS = HelpdeskArticles.QUESTS_PRIVACY_CONTROLS;
|
|
items3[3] = (
|
|
<TextWithIOSLinkWorkaround variant="text-md/medium" color="mobile-text-heading-primary">
|
|
{Reflect.apply(format, intl, [tzq9Wa, {privacySettingsUrl: Reflect.apply(getArticleURL, defaultImport,
|
|
[QUESTS_PRIVACY_CONTROLS])}])}
|
|
</TextWithIOSLinkWorkaround>
|
|
);
|
|
const Button = (ButtonNativeModule).Button;
|
|
items3[4] = (
|
|
<View style={styles.closeButton}>
|
|
<Button
|
|
variant="primary"
|
|
grow
|
|
size="lg"
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
|
|
onPress={onClose}
|
|
/>
|
|
</View>
|
|
);
|
|
return (
|
|
<View style={styles.container}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
function _fun103233({icon, text}, a1) { // fn#103233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13772:1819, offset: 0x0225def7, size: 193 bytes, params: 3, frame: 23
|
|
const stylesBinding = styles;
|
|
const targetItem = stylesBinding.targetItem;
|
|
const items2 = [stylesBinding.disclosureText];
|
|
items2[1] = a1 === env0_1.length - 1 && styles.lastTargetItem;
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<View style={targetItem} key={a1}>
|
|
{icon}
|
|
<View style={items2}>
|
|
<Text variant="text-md/semibold">
|
|
{text}
|
|
</Text>
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun103231, 13582, [27, 661, 33, 4501, 697, 3829, 9390, 1244, 9404, 11441, 8658, 5473, 4573, 9505, 6239,
|
|
6766, 1948, 4578,
|
|
2]) /* metro module 13582, dependencies: [27, 661, 33, 4501, 697, 3829, 9390, 1244, 9404, 11441, 8658, 5473, 4573, 9505, 6239, 6766, 1948, 4578, 2] */;
|