decord/source/modules/reactions/native/EmojiReactionRowButton.tsx
github-actions cd74c1f217 chore: update source for alpha 345.5
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9667_m.js (378 MB)
2026-09-05 10:56:28 +00:00

110 lines
4.8 KiB
TypeScript

// Module ID: 11732
// Function ID: 11733
// Name: EmojiPickerRowButton
// Dependencies: [19, 17, 1374, 21, 4560, 576, 4411, 5123, 1114, 8757, 7130, 1396, 4216, 2]
// Exports: EmojiPickerRowButton, EmojiReactionRowButton, getEmojiKey
// Module 11732 (EmojiPickerRowButton)
import ThemesDefault from "Themes" /* 576 */;
import getSystemLocale from "getSystemLocale" /* 1114 */;
import EmojiTypes from "EmojiTypes" /* 4216 */;
import AccessibilityAnnouncer from "AccessibilityAnnouncer" /* 4411 */;
import PressableBase from "PressableBase" /* 5123 */;
import EmojiDefault from "Emoji" /* 7130 */;
import ReactionIcon from "ReactionIcon" /* 8757 */;
import closure_3 from "noop" /* 19 */;
import { Platform } from "get ActivityIndicator" /* 17 */;
import { EMOJI_URL_BASE_SIZE } from "set" /* 1374 */;
import { jsx } from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4560 */;
require = arg1;
let closure_6 = createCacheKey.createStyles((width) => {
let obj = { emojiContainer: null };
obj = { width, height: width, alignItems: "center", justifyContent: "center", backgroundColor: ThemesDefault.colors.MOBILE_EMOJI_BUTTON_BACKGROUND, borderRadius: ThemesDefault.modules.button.BORDER_RADIUS, overflow: "hidden" };
obj[0] = obj;
return obj;
});
let closure_7 = createCacheKey.createStyles((width, fontSize, lineHeight) => {
obj = { emojiImage: obj, emojiText: null };
obj = { width, height: width };
obj = { lineHeight, fontSize, color: ThemesDefault.colors.INTERACTIVE_TEXT_DEFAULT, textAlign: "center", width: lineHeight, height: lineHeight };
obj[1] = obj;
return obj;
});
const result = require("set").fileFinishedImporting("modules/reactions/native/EmojiReactionRowButton.tsx");
export const EmojiPickerRowButton = function EmojiPickerRowButton(iconSize) {
let str = iconSize.iconSize;
({ onPress, styles } = iconSize);
let obj = AccessibilityAnnouncer;
const tmp = callback(iconSize.emojiContainerSize);
const obj2 = AccessibilityAnnouncer;
const unsafe_rawColors = ThemesDefault.unsafe_rawColors;
const isThemeLightResult = AccessibilityAnnouncer.isThemeLight(obj.useThemeContext().theme);
obj = { activeOpacity: 0.5, accessibilityRole: "button", accessibilityLabel: null, hitSlop: 4, onPress: null, style: null, children: null };
const intl = tmp2(1114).intl;
obj[2] = intl.string(getSystemLocale.t.lfIHs4);
obj[4] = onPress;
const items = [tmp.emojiContainer, styles];
obj[5] = items;
obj = { color: AccessibilityAnnouncer.isThemeLight(obj.useThemeContext().theme) ? unsafe_rawColors.PRIMARY_500 : unsafe_rawColors.PRIMARY_300, size: null };
if (str == null) {
str = "md";
}
obj[1] = str;
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 });
};
export const EmojiReactionRowButton = function EmojiReactionRowButton(emoji) {
animated = emoji.emoji;
({ emojiSize, emojiFontSize, emojiLineHeight, onPress, styles } = emoji);
const tmp = callback(emoji.emojiContainerSize);
let obj = dependencyMap;
const memo = React.useMemo(() => ({ foreground: true }), []);
obj = { androidRippleConfig: memo, activeOpacity: 0.5, accessibilityRole: "button", accessibilityLabel: null, disabled: null, hitSlop: 4, onPress: null, style: null, children: null };
const intl = getSystemLocale.intl;
let name;
if (animated != null) {
name = animated.name;
}
obj[3] = intl.formatToPlainString(getSystemLocale.t["/iYSo6"], { emojiName: name });
obj[4] = null == animated;
obj[6] = onPress;
const items = [tmp.emojiContainer, styles];
obj[7] = items;
if (null == animated) {
obj[8] = null;
return tmp4(PressableBase.PressableOpacity, obj);
} else {
let getEmojiURL = importDefault;
obj = { textEmojiStyle: null, fastImageStyle: null, name: null, src: null };
({ emojiText: obj3[0], emojiImage: obj3[1] } = tmp2);
let str = "";
if (null == animated.id) {
str = animated.surrogates;
}
obj[2] = str;
if (null != animated.id) {
const emojiURL = getEmojiURL(1396);
getEmojiURL = emojiURL.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);
} else {
url = animated.url;
}
obj[3] = url;
tmp4(EmojiDefault, obj);
const tmp6 = EmojiDefault;
}
};
export const getEmojiKey = function getEmojiKey(type, arg1) {
if (null == type) {
return arg1;
} else {
type.type === EmojiTypes.EmojiTypes.UNICODE ? type.surrogates : type.id;
}
};