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

119 lines
5 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 9907
2026-07-27 11:26:19 +00:00
// Function ID: 76743
2026-07-20 16:05:17 +00:00
// Name: EmojiPickerRowButton
2026-07-25 08:10:48 +00:00
// Dependencies: [31, 27, 1853, 33, 4131, 689, 3977, 4661, 1212, 6519, 1324, 5150, 1392, 3775, 2]
2026-07-20 16:05:17 +00:00
// Exports: EmojiPickerRowButton, EmojiReactionRowButton, getEmojiKey
2026-07-25 08:10:48 +00:00
// Module 9907 (EmojiPickerRowButton)
2026-07-23 10:11:24 +00:00
import result from "result";
import { Platform } from "get ActivityIndicator";
import { EMOJI_URL_BASE_SIZE } from "set";
import { jsx } from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
let closure_6 = _createForOfIteratorHelperLoose.createStyles((width) => {
2026-07-20 16:05:17 +00:00
let obj = {};
2026-07-23 10:11:24 +00:00
obj = { width, height: width, alignItems: "center", justifyContent: "center", backgroundColor: importDefault(689).colors.MOBILE_EMOJI_BUTTON_BACKGROUND, borderRadius: importDefault(689).modules.button.BORDER_RADIUS, overflow: "hidden" };
2026-07-20 16:05:17 +00:00
obj.emojiContainer = obj;
return obj;
});
2026-07-23 10:11:24 +00:00
let closure_7 = _createForOfIteratorHelperLoose.createStyles((width, fontSize, lineHeight) => {
2026-07-20 16:05:17 +00:00
let tmp = width;
if (arg3) {
tmp = lineHeight;
}
2026-07-23 10:11:24 +00:00
obj = { emojiImage: obj };
2026-07-20 16:05:17 +00:00
obj = { width, height: width };
2026-07-23 10:11:24 +00:00
obj = { lineHeight, fontSize, color: importDefault(689).colors.INTERACTIVE_TEXT_DEFAULT, textAlign: "center", width: tmp, height: tmp };
2026-07-20 16:05:17 +00:00
const merged = Object.assign(tmp2);
obj.emojiText = obj;
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) {
let onPress;
let styles;
iconSize = iconSize.iconSize;
({ onPress, styles } = iconSize);
2026-07-25 08:10:48 +00:00
let obj = require(3977) /* AccessibilityAnnouncer */;
2026-07-20 16:05:17 +00:00
const tmp = callback(iconSize.emojiContainerSize);
2026-07-25 08:10:48 +00:00
const obj2 = require(3977) /* AccessibilityAnnouncer */;
2026-07-23 10:11:24 +00:00
const unsafe_rawColors = importDefault(689).unsafe_rawColors;
2026-07-25 08:10:48 +00:00
const isThemeLightResult = require(3977) /* AccessibilityAnnouncer */.isThemeLight(obj.useThemeContext().theme);
2026-07-23 10:11:24 +00:00
obj = { activeOpacity: 0.5, accessibilityRole: "button", accessibilityLabel: null, hitSlop: 4 };
const intl = require(1212) /* getSystemLocale */.intl;
obj.accessibilityLabel = intl.string(require(1212) /* getSystemLocale */.t.lfIHs4);
2026-07-20 16:05:17 +00:00
obj.onPress = onPress;
const items = [tmp.emojiContainer, styles];
obj.style = items;
2026-07-25 08:10:48 +00:00
obj = { color: require(3977) /* AccessibilityAnnouncer */.isThemeLight(obj.useThemeContext().theme) ? unsafe_rawColors.PRIMARY_500 : unsafe_rawColors.PRIMARY_300 };
2026-07-20 16:05:17 +00:00
let str = "md";
if (null != iconSize) {
str = iconSize;
}
obj.size = str;
2026-07-25 08:10:48 +00:00
obj.children = jsx(require(6519) /* ReactionIcon */.ReactionIcon, { color: require(3977) /* AccessibilityAnnouncer */.isThemeLight(obj.useThemeContext().theme) ? unsafe_rawColors.PRIMARY_500 : unsafe_rawColors.PRIMARY_300 });
return jsx(require(4661) /* PressableBase */.PressableOpacity, { color: require(3977) /* AccessibilityAnnouncer */.isThemeLight(obj.useThemeContext().theme) ? unsafe_rawColors.PRIMARY_500 : unsafe_rawColors.PRIMARY_300 });
2026-07-20 16:05:17 +00:00
};
export const EmojiReactionRowButton = function EmojiReactionRowButton(emojiContainerSize) {
let animated;
let emojiFontSize;
let emojiLineHeight;
let emojiSize;
let onPress;
let styles;
({ emoji: animated, emojiSize } = emojiContainerSize);
({ emojiFontSize, emojiLineHeight, onPress, styles } = emojiContainerSize);
const tmp = callback(emojiContainerSize.emojiContainerSize);
const memo = React.useMemo(() => ({ foreground: true }), []);
2026-07-23 10:11:24 +00:00
let obj = { androidRippleConfig: memo, activeOpacity: 0.5, accessibilityRole: "button", accessibilityLabel: null, disabled: null, hitSlop: 4 };
const intl = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
obj = {};
let name;
if (null != animated) {
name = animated.name;
}
obj.emojiName = name;
2026-07-23 10:11:24 +00:00
obj.accessibilityLabel = intl.formatToPlainString(require(1212) /* getSystemLocale */.t["/iYSo6"], obj);
2026-07-20 16:05:17 +00:00
obj.disabled = null == animated;
obj.onPress = onPress;
const items = [tmp.emojiContainer, styles];
obj.style = items;
if (null == animated) {
obj.children = null;
2026-07-25 08:10:48 +00:00
return jsx(require(4661) /* PressableBase */.PressableOpacity, obj);
2026-07-20 16:05:17 +00:00
} else {
obj = {};
({ emojiText: obj3.textEmojiStyle, emojiImage: obj3.fastImageStyle } = tmp2);
let str = "";
if (null == animated.id) {
str = animated.surrogates;
}
obj.name = str;
if (null != animated.id) {
const obj1 = {};
({ id: obj5.id, animated } = animated);
obj1.animated = animated;
obj1.size = EMOJI_URL_BASE_SIZE;
2026-07-23 10:11:24 +00:00
let url = importDefault(1392).getEmojiURL(obj1);
const obj4 = importDefault(1392);
2026-07-20 16:05:17 +00:00
} else {
url = animated.url;
}
obj.src = url;
2026-07-25 08:10:48 +00:00
jsx(importDefault(5150), {});
2026-07-20 16:05:17 +00:00
const tmp6 = jsx;
2026-07-25 08:10:48 +00:00
const tmp9 = importDefault(5150);
2026-07-20 16:05:17 +00:00
}
};
export const getEmojiKey = function getEmojiKey(type, arg1) {
if (null == type) {
return arg1;
} else {
2026-07-25 08:10:48 +00:00
type.type === require(3775) /* EmojiTypes */.EmojiTypes.UNICODE ? type.surrogates : type.id;
2026-07-20 16:05:17 +00:00
}
};