79 lines
4.7 KiB
TypeScript
79 lines
4.7 KiB
TypeScript
/* Metro module 8852; source: modules/activity_status/native/ActivityEmoji.tsx; dependencies: [31, 33, 4501, 3829, 1423, 7950, 6739, 2] */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
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 UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
|
|
function _fun69030(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9037:6, offset: 0x01c65a84, size: 207 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_5 = (CreateStylesModule).createStyles({emoji: {'flexShrink': 0,
|
|
'width': '100%', 'height': '100%'}, text: {'textAlign': 'center', 'fontFamily': 'System'}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/activity_status/native/ActivityEmoji.tsx');
|
|
exports.default = ActivityEmoji;
|
|
function ActivityEmoji({emoji, size, style, withPlaceholder, animate}) { // fn#69031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9037:332, offset: 0x01c65b53, size: 401 bytes, params: 2, frame: 23
|
|
var r1;
|
|
var r0;
|
|
var defaultImport;
|
|
withPlaceholder = !(withPlaceholder === undefined) && withPlaceholder;
|
|
animate = animate === undefined || animate;
|
|
const styles = useStyles();
|
|
const AnimateEmoji = (UserSettingsModule).AnimateEmoji;
|
|
const value5 = AnimateEmoji.useSetting();
|
|
const Boolean = global.Boolean;
|
|
const value8 = ReactModule.useMemo(_fun69032, [emoji?.id, Boolean(emoji?.animated && value5 && animate)]);
|
|
if (emoji != null) {
|
|
if (emoji == null) {
|
|
const ReactionIcon = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
|
|
r1 = <ReactionIcon style={style} size="sm" />;
|
|
} else {
|
|
defaultImport = importDefault(6739) /* metro dependency 6739: Emoji */;
|
|
var defaultImportProps2 = {src: value8, name: emoji.name, style: [style, {width: size, height: size}]};
|
|
emoji = styles.emoji;
|
|
defaultImportProps2.textEmojiStyle = [emoji, styles.text, {fontSize: size}];
|
|
emoji = styles.emoji;
|
|
defaultImportProps2.fastImageStyle = emoji;
|
|
defaultImportProps2.adjustsFontSizeToFit = true;
|
|
r1 = ((Component) => <Component {...defaultImportProps2} />)(defaultImport);
|
|
}
|
|
r0 = r1;
|
|
} else if (withPlaceholder) {
|
|
if (emoji == null) {
|
|
const ReactionIcon2 = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
|
|
r1 = <ReactionIcon2 style={style} size="sm" />;
|
|
} else {
|
|
defaultImport = importDefault(6739) /* metro dependency 6739: Emoji */;
|
|
var defaultImportProps2 = {src: value8, name: emoji.name, style: [style, {width: size, height: size}]};
|
|
emoji = styles.emoji;
|
|
defaultImportProps2.textEmojiStyle = [emoji, styles.text, {fontSize: size}];
|
|
emoji = styles.emoji;
|
|
defaultImportProps2.fastImageStyle = emoji;
|
|
defaultImportProps2.adjustsFontSizeToFit = true;
|
|
r1 = ((Component) => <Component {...defaultImportProps2} />)(defaultImport);
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = null;
|
|
}
|
|
return r0;
|
|
function _fun69032() { // fn#69032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9037:519, offset: 0x01c65ce4, size: 102 bytes, params: 1, frame: 13
|
|
var value3;
|
|
const emojiBinding = emoji;
|
|
const value2 = undefined;
|
|
if ((emojiBinding == null ? value2 : emoji.id) != null) {
|
|
value3 = environment.__proto__;
|
|
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: emoji.id, size: 48,
|
|
animated: env0_1});
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun69030, 8852, [31, 33, 4501, 3829, 1423, 7950, 6739,
|
|
2]) /* metro module 8852, dependencies: [31, 33, 4501, 3829, 1423, 7950, 6739, 2] */;
|