142 lines
8.1 KiB
TypeScript
142 lines
8.1 KiB
TypeScript
/* Metro module 8624; source: modules/messages/native/emoji/StandardEmojiContent.tsx; dependencies: [31, 27, 3969, 33, 4501, 697, 8625, 3801, 5475, 4573, 8626, 3797, 8533, 8627, 1244, 7972, 4578, 8629, 2] */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import EmojiUtils from '../../../../utils/EmojiUtils.tsx'; /* Metro dependency 3801 */
|
|
import SelectedGuildStore from '../../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
|
|
import UseMaybeAddReactionMarketingEasterEggNote from '../../useMaybeAddReactionMarketingEasterEggNote.tsx'; /* Metro dependency 8627 */
|
|
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 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/void/Form/native/index.tsx'; /* Metro dependency 7972 */
|
|
import * as EmojiPickerUtilsModule from '../../../emoji_picker/EmojiPickerUtils.tsx'; /* Metro dependency 8533 */
|
|
import * as UseSharedMessageEmojiStylesModule from './useSharedMessageEmojiStyles.tsx'; /* Metro dependency 8625 */
|
|
import * as UseTrackOpenPopoutModule from '../../../emojis/useTrackOpenPopout.tsx'; /* Metro dependency 8626 */
|
|
import * as EmojiActionCreatorsModule from '../../../../actions/EmojiActionCreators.tsx'; /* Metro dependency 8629 */
|
|
|
|
function _fun68061(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:6, offset: 0x01c3d347, size: 291 bytes, params: 8, frame: 21
|
|
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;
|
|
const PX_4 = (Native).space.PX_4;
|
|
const env0_9 = Reflect.apply(createStyles, value, [{emojiSurrogate: {'lineHeight': 48, 'fontSize': 40, 'margin': 8},
|
|
ctaContainer: {paddingTop: PX_4}}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/emoji/StandardEmojiContent.tsx');
|
|
exports.default = _default_68063;
|
|
function Emoji_68062({surrogate}) { // fn#68062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:294, offset: 0x01c3d46a, size: 256 bytes, params: 2, frame: 21
|
|
var r4;
|
|
const object = {};
|
|
var value;
|
|
const styles = useStyles();
|
|
copyDataProperties(object, styles, undefined);
|
|
const useSharedMessageEmojiStyles = UseSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
|
|
copyDataProperties(object, Reflect.apply(useSharedMessageEmojiStyles, UseSharedMessageEmojiStylesModule, []),
|
|
undefined);
|
|
const uRL = (EmojiUtils).getURL(surrogate);
|
|
const emojiWrapper = object.emojiWrapper;
|
|
if (uRL !== '') {
|
|
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
|
value = ((Component) => <Component style={object.emojiIcon} resizeMode="contain" source={{uri: uRL}} />)(value);
|
|
r4 = value;
|
|
} else {
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
r4 = (
|
|
<Text style={object.emojiSurrogate} variant="text-md/medium">
|
|
{surrogate}
|
|
</Text>
|
|
);
|
|
}
|
|
return (
|
|
<View style={emojiWrapper}>
|
|
{r4}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _default_68063({emojiNode, nonce}) { // fn#68063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:608, offset: 0x01c3d56a, size: 695 bytes, params: 2, frame: 32
|
|
const object = {};
|
|
const styles = useStyles();
|
|
copyDataProperties(object, styles, undefined);
|
|
const useSharedMessageEmojiStyles = UseSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
|
|
copyDataProperties(object, Reflect.apply(useSharedMessageEmojiStyles, UseSharedMessageEmojiStylesModule, []),
|
|
undefined);
|
|
const guildId = SelectedGuildStore.getGuildId();
|
|
(UseTrackOpenPopoutModule).useTrackOpenPopout({currentGuildId: guildId,
|
|
nonce: nonce});
|
|
const value4 = (EmojiPickerUtilsModule).useIsFavoriteEmoji(guildId,
|
|
ReactModule.useMemo(_fun68064, [emojiNode.surrogate]));
|
|
const value5 = (UseMaybeAddReactionMarketingEasterEggNote)(emojiNode.content);
|
|
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
|
const emojiContainer = object.emojiContainer;
|
|
const emoji_68062 = <Emoji_68062 surrogate={emojiNode.surrogate} />;
|
|
const emojiDescriptionWrapper = object.emojiDescriptionWrapper;
|
|
const Text = (TextModule).Text;
|
|
const text = (
|
|
<Text variant="text-md/bold" color="mobile-text-heading-primary">
|
|
{value5}
|
|
</Text>
|
|
);
|
|
const intl = (IndexNativeModule).intl;
|
|
let string = intl.string;
|
|
const t = (IndexNativeModule).t;
|
|
const items4 = [
|
|
<View style={emojiContainer}>
|
|
{emoji_68062}
|
|
<View style={emojiDescriptionWrapper}>
|
|
{text}
|
|
<Text variant="text-sm/medium">
|
|
{Reflect.apply(string, intl, [t.sXdH8c])}
|
|
</Text>
|
|
</View>
|
|
</View>,
|
|
];
|
|
const FormDivider = (NativeModule).FormDivider;
|
|
items4[1] = <FormDivider style={object.divider} />;
|
|
const ctaContainer = object.ctaContainer;
|
|
const Button = (ButtonNativeModule).Button;
|
|
string = intl.string;
|
|
items4[2] = (
|
|
<View style={ctaContainer}>
|
|
<Button
|
|
text={value4 ? Reflect.apply(string, intl, [t.Ay49KA]) : Reflect.apply(string, intl, [t.nNsr67])}
|
|
variant={value4 ? 'tertiary' : 'primary'}
|
|
onPress={onPress_68065}
|
|
/>
|
|
</View>
|
|
);
|
|
return (
|
|
<>
|
|
{items4}
|
|
</>
|
|
);
|
|
function _fun68064() { // fn#68064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:780, offset: 0x01c3d821, size: 51 bytes, params: 1, frame: 11
|
|
let value = environment.__proto__;
|
|
value = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */;
|
|
return value.convertSurrogateToBase(emojiNode.surrogate);
|
|
}
|
|
|
|
function _default_68063OnPress() { // fn#68065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:1450, owner: _default_68063.onPress, offset: 0x01c3d854, size: 69 bytes, params: 1, frame: 13
|
|
const binding = env0_2;
|
|
if (binding) {
|
|
EmojiActionCreatorsModule.unfavoriteEmoji(env0_1);
|
|
} else {
|
|
EmojiActionCreatorsModule.favoriteEmoji(env0_1);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun68061, 8624, [31, 27, 3969, 33, 4501, 697, 8625, 3801, 5475, 4573, 8626, 3797, 8533, 8627, 1244,
|
|
7972, 4578, 8629,
|
|
2]) /* metro module 8624, dependencies: [31, 27, 3969, 33, 4501, 697, 8625, 3801, 5475, 4573, 8626, 3797, 8533, 8627, 1244, 7972, 4578, 8629, 2] */;
|