decord/source/modules/reactions/native/EmojiReactionRowButton.tsx
2026-08-06 08:05:19 +00:00

117 lines
5 KiB
TypeScript

// Module ID: 9777
// Function ID: 9778
// Name: EmojiPickerRowButton
// Dependencies: [19, 17, 1906, 21, 4285, 712, 4130, 4827, 1236, 7576, 1348, 5340, 1416, 3928, 2]
// Exports: EmojiPickerRowButton, EmojiReactionRowButton, getEmojiKey
// Module 9777 (EmojiPickerRowButton)
import noop from "noop";
import { Platform } from "get ActivityIndicator";
import { EMOJI_URL_BASE_SIZE } from "set";
import { jsx } from "jsxProd";
import createCacheKey from "createCacheKey";
import createCacheKey from "createCacheKey";
const require = arg1;
let closure_6 = createCacheKey.createStyles((width) => {
let obj = { emojiContainer: null };
obj = { width, height: width, alignItems: "center", justifyContent: "center", backgroundColor: importDefault(712).colors.MOBILE_EMOJI_BUTTON_BACKGROUND, borderRadius: importDefault(712).modules.button.BORDER_RADIUS, overflow: "hidden" };
obj[0] = obj;
return obj;
});
let closure_7 = createCacheKey.createStyles((width, fontSize, lineHeight) => {
let tmp = width;
if (arg3) {
tmp = lineHeight;
}
obj = { emojiImage: obj, emojiText: null };
obj = { width, height: width };
obj = { lineHeight, fontSize, color: importDefault(712).colors.INTERACTIVE_TEXT_DEFAULT, textAlign: "center", width: tmp, height: tmp };
const merged = Object.assign(tmp2);
obj[1] = obj;
return obj;
});
const result = require("set").fileFinishedImporting("modules/reactions/native/EmojiReactionRowButton.tsx");
export const EmojiPickerRowButton = function EmojiPickerRowButton(iconSize) {
let onPress;
let styles;
let str = iconSize.iconSize;
({ onPress, styles } = iconSize);
let obj = require(4130) /* AccessibilityAnnouncer */;
const tmp = callback(iconSize.emojiContainerSize);
const obj2 = require(4130) /* AccessibilityAnnouncer */;
const unsafe_rawColors = importDefault(712).unsafe_rawColors;
const isThemeLightResult = require(4130) /* AccessibilityAnnouncer */.isThemeLight(obj.useThemeContext().theme);
obj = { activeOpacity: 0.5, accessibilityRole: "button", accessibilityLabel: null, hitSlop: 4, onPress: null, style: null, children: null };
const intl = tmp2(1236).intl;
obj[2] = intl.string(require(1236) /* getSystemLocale */.t.lfIHs4);
obj[4] = onPress;
const items = [tmp.emojiContainer, styles];
obj[5] = items;
obj = { color: require(4130) /* 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(require(7576) /* ReactionIcon */.ReactionIcon, { color: require(4130) /* AccessibilityAnnouncer */.isThemeLight(obj.useThemeContext().theme) ? unsafe_rawColors.PRIMARY_500 : unsafe_rawColors.PRIMARY_300, size: null });
return jsx(require(4827) /* PressableBase */.PressableOpacity, { color: require(4130) /* AccessibilityAnnouncer */.isThemeLight(obj.useThemeContext().theme) ? unsafe_rawColors.PRIMARY_500 : unsafe_rawColors.PRIMARY_300, size: null });
};
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);
let getEmojiURL = importDefault;
let obj = dependencyMap;
const tmp = callback(emojiContainerSize.emojiContainerSize);
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 = require(1236) /* getSystemLocale */.intl;
let name;
if (animated != null) {
name = animated.name;
}
obj[3] = intl.formatToPlainString(require(1236) /* 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(require(4827) /* PressableBase */.PressableOpacity, obj);
} else {
obj = { textEmojiStyle: null, fastImageStyle: null, name: null, src: null };
({ emojiText: obj3[0], emojiImage: obj3[1] } = tmp2);
let str = "";
const emojiURL = getEmojiURL(5340);
if (null == animated.id) {
str = animated.surrogates;
}
obj[2] = str;
if (null != animated.id) {
const emojiURL1 = getEmojiURL(1416);
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);
} else {
url = animated.url;
}
obj[3] = url;
tmp4(emojiURL, obj);
}
};
export const getEmojiKey = function getEmojiKey(type, arg1) {
if (null == type) {
return arg1;
} else {
type.type === require(3928) /* EmojiTypes */.EmojiTypes.UNICODE ? type.surrogates : type.id;
}
};