decord/source/modules/reactions/native/EmojiReactionRowButton.tsx

117 lines
5 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 10934
// Function ID: 10935
2026-07-20 16:05:17 +00:00
// Name: EmojiPickerRowButton
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 1925, 21, 4668, 712, 1363, 5438, 1236, 7978, 1367, 6968, 1435, 4040, 2]
2026-07-20 16:05:17 +00:00
// Exports: EmojiPickerRowButton, EmojiReactionRowButton, getEmojiKey
2026-08-24 06:08:38 +00:00
// Module 10934 (EmojiPickerRowButton)
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import AccessibilityAnnouncer from "AccessibilityAnnouncer" /* 1363 */;
import getAvatarURLDefault from "getAvatarURL" /* 1435 */;
import EmojiTypes from "EmojiTypes" /* 4040 */;
import PressableBase from "PressableBase" /* 5438 */;
import EmojiDefault from "Emoji" /* 6968 */;
import ReactionIcon from "ReactionIcon" /* 7978 */;
import closure_3 from "noop" /* 19 */;
import { Platform } from "get ActivityIndicator" /* 17 */;
import { EMOJI_URL_BASE_SIZE } from "set" /* 1925 */;
import { jsx } from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-29 08:29:29 +00:00
let closure_6 = createCacheKey.createStyles((width) => {
let obj = { emojiContainer: null };
2026-08-24 06:08:38 +00:00
obj = { width, height: width, alignItems: "center", justifyContent: "center", backgroundColor: ThemesDefault.colors.MOBILE_EMOJI_BUTTON_BACKGROUND, borderRadius: ThemesDefault.modules.button.BORDER_RADIUS, overflow: "hidden" };
2026-07-29 08:29:29 +00:00
obj[0] = obj;
2026-07-20 16:05:17 +00:00
return obj;
});
2026-07-29 08:29:29 +00:00
let closure_7 = createCacheKey.createStyles((width, fontSize, lineHeight) => {
2026-07-20 16:05:17 +00:00
let tmp = width;
if (arg3) {
tmp = lineHeight;
}
2026-07-29 08:29:29 +00:00
obj = { emojiImage: obj, emojiText: null };
2026-07-20 16:05:17 +00:00
obj = { width, height: width };
2026-08-24 06:08:38 +00:00
obj = { lineHeight, fontSize, color: ThemesDefault.colors.INTERACTIVE_TEXT_DEFAULT, textAlign: "center", width: tmp, height: tmp };
2026-07-20 16:05:17 +00:00
const merged = Object.assign(tmp2);
2026-07-29 08:29:29 +00:00
obj[1] = obj;
2026-07-20 16:05:17 +00:00
return obj;
});
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("modules/reactions/native/EmojiReactionRowButton.tsx");
2026-07-20 16:05:17 +00:00
export const EmojiPickerRowButton = function EmojiPickerRowButton(iconSize) {
2026-07-29 08:29:29 +00:00
let str = iconSize.iconSize;
2026-07-20 16:05:17 +00:00
({ onPress, styles } = iconSize);
2026-08-24 06:08:38 +00:00
let obj = AccessibilityAnnouncer;
2026-07-20 16:05:17 +00:00
const tmp = callback(iconSize.emojiContainerSize);
2026-08-24 06:08:38 +00:00
const obj2 = AccessibilityAnnouncer;
const unsafe_rawColors = ThemesDefault.unsafe_rawColors;
const isThemeLightResult = AccessibilityAnnouncer.isThemeLight(obj.useThemeContext().theme);
2026-07-29 08:29:29 +00:00
obj = { activeOpacity: 0.5, accessibilityRole: "button", accessibilityLabel: null, hitSlop: 4, onPress: null, style: null, children: null };
const intl = tmp2(1236).intl;
2026-08-24 06:08:38 +00:00
obj[2] = intl.string(getSystemLocale.t.lfIHs4);
2026-07-29 08:29:29 +00:00
obj[4] = onPress;
2026-07-20 16:05:17 +00:00
const items = [tmp.emojiContainer, styles];
2026-07-29 08:29:29 +00:00
obj[5] = items;
2026-08-24 06:08:38 +00:00
obj = { color: AccessibilityAnnouncer.isThemeLight(obj.useThemeContext().theme) ? unsafe_rawColors.PRIMARY_500 : unsafe_rawColors.PRIMARY_300, size: null };
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "md";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = str;
2026-08-24 06:08:38 +00:00
obj[6] = jsx(ReactionIcon.ReactionIcon, { color: AccessibilityAnnouncer.isThemeLight(obj.useThemeContext().theme) ? unsafe_rawColors.PRIMARY_500 : unsafe_rawColors.PRIMARY_300, size: null });
return jsx(PressableBase.PressableOpacity, { color: AccessibilityAnnouncer.isThemeLight(obj.useThemeContext().theme) ? unsafe_rawColors.PRIMARY_500 : unsafe_rawColors.PRIMARY_300, size: null });
2026-07-20 16:05:17 +00:00
};
export const EmojiReactionRowButton = function EmojiReactionRowButton(emojiContainerSize) {
({ emoji: animated, emojiSize } = emojiContainerSize);
({ emojiFontSize, emojiLineHeight, onPress, styles } = emojiContainerSize);
2026-07-29 08:29:29 +00:00
let getEmojiURL = importDefault;
let obj = dependencyMap;
2026-07-20 16:05:17 +00:00
const tmp = callback(emojiContainerSize.emojiContainerSize);
const memo = React.useMemo(() => ({ foreground: true }), []);
2026-07-29 08:29:29 +00:00
obj = { androidRippleConfig: memo, activeOpacity: 0.5, accessibilityRole: "button", accessibilityLabel: null, disabled: null, hitSlop: 4, onPress: null, style: null, children: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
2026-07-20 16:05:17 +00:00
let name;
2026-07-29 08:29:29 +00:00
if (animated != null) {
2026-07-20 16:05:17 +00:00
name = animated.name;
}
2026-08-24 06:08:38 +00:00
obj[3] = intl.formatToPlainString(getSystemLocale.t["/iYSo6"], { emojiName: name });
2026-07-29 08:29:29 +00:00
obj[4] = null == animated;
obj[6] = onPress;
2026-07-20 16:05:17 +00:00
const items = [tmp.emojiContainer, styles];
2026-07-29 08:29:29 +00:00
obj[7] = items;
2026-07-20 16:05:17 +00:00
if (null == animated) {
2026-07-29 08:29:29 +00:00
obj[8] = null;
2026-08-24 06:08:38 +00:00
return tmp4(PressableBase.PressableOpacity, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj = { textEmojiStyle: null, fastImageStyle: null, name: null, src: null };
({ emojiText: obj3[0], emojiImage: obj3[1] } = tmp2);
2026-07-20 16:05:17 +00:00
let str = "";
2026-08-24 06:08:38 +00:00
const emojiURL = EmojiDefault;
2026-07-20 16:05:17 +00:00
if (null == animated.id) {
str = animated.surrogates;
}
2026-07-29 08:29:29 +00:00
obj[2] = str;
2026-07-20 16:05:17 +00:00
if (null != animated.id) {
2026-08-24 06:08:38 +00:00
const emojiURL1 = getAvatarURLDefault;
2026-07-29 08:29:29 +00:00
getEmojiURL = emojiURL1.getEmojiURL;
obj = { id: null, animated: null, size: null };
({ id: obj[0], animated } = animated);
obj[1] = animated;
obj[2] = EMOJI_URL_BASE_SIZE;
let url = getEmojiURL(obj);
2026-07-20 16:05:17 +00:00
} else {
url = animated.url;
}
2026-07-29 08:29:29 +00:00
obj[3] = url;
tmp4(emojiURL, obj);
2026-07-20 16:05:17 +00:00
}
};
export const getEmojiKey = function getEmojiKey(type, arg1) {
if (null == type) {
return arg1;
} else {
2026-08-24 06:08:38 +00:00
type.type === EmojiTypes.EmojiTypes.UNICODE ? type.surrogates : type.id;
2026-07-20 16:05:17 +00:00
}
};