decord/source/modules/chat_input/native/ChatInputNativeComponent.tsx

71 lines
3.3 KiB
TypeScript
Raw Normal View History

// Module ID: 12381
// Function ID: 12382
// Name: chat_input/ChatInputNativeComponent
// Dependencies: [19, 4456, 21, 4636, 576, 1114, 4571, 4488, 4486, 1363, 12161, 12119, 2]
2026-07-20 16:05:17 +00:00
// Module 12381 (chat_input/ChatInputNativeComponent)
import nativeDefault from "native" /* 576 */;
import util from "util" /* 1114 */;
import PlatformUtils from "PlatformUtils" /* 1363 */;
import ColorUtils from "ColorUtils" /* 4486 */;
import shared from "shared" /* 4488 */;
import useTheme from "useTheme" /* 4571 */;
import ChatInputNativeComponent from "ChatInputNativeComponent" /* 12119 */;
import noop from "module_19" /* 19 */;
import ClientThemesBackgroundStore from "ClientThemesBackgroundStore" /* 4456 */;
2026-07-23 10:11:24 +00:00
require = fn;
const jsx = fn(21).jsx;
const createStyles = fn(4636);
let obj = { style: { flex: 1 }, textColor: { color: nativeDefault.colors.TEXT_DEFAULT }, placeholderColor: null };
let obj3 = { color: nativeDefault.colors.TEXT_DEFAULT };
obj.placeholderColor = { color: nativeDefault.colors.TEXT_MUTED };
let closure_5 = createStyles.createStyles(obj);
const forwardRefResult = noop.forwardRef((markAsSpoilerTitle, ref) => {
2026-07-20 16:05:17 +00:00
markAsSpoilerTitle = markAsSpoilerTitle.markAsSpoilerTitle;
2026-08-27 22:34:12 +00:00
({ accessible, accessibilityLabel, customKeyboard, placeholder, editable } = markAsSpoilerTitle);
2026-07-20 16:05:17 +00:00
if (markAsSpoilerTitle === undefined) {
const intl = util.intl;
markAsSpoilerTitle = intl.string(util.t["gsI+xC"]);
2026-07-20 16:05:17 +00:00
}
({ setNoExtractUI, shouldShowCursor, onBeginFocus, onEndBlur, onChangeContentSize, onMaxHeightChanged, onSelectionOrTextChange, onTextFlushed, onPasteImage, onPasteCommand, onTapAction, onRequestSend, verticalInset } = markAsSpoilerTitle);
const tmp3 = closure_5();
const theme = useTheme.useTheme();
const isThemeDarkResult = shared.isThemeDark(theme);
const unsafe_rawColors = nativeDefault.unsafe_rawColors;
2026-07-29 08:29:29 +00:00
if (isThemeDarkResult) {
let PRIMARY_500 = unsafe_rawColors.WHITE;
let tmp9 = tmp8;
} else {
PRIMARY_500 = unsafe_rawColors.PRIMARY_500;
tmp9 = tmp8;
}
let num = 0.6;
if (null != ClientThemesBackgroundStore.gradientPreset) {
2026-07-29 08:29:29 +00:00
num = 0.8;
2026-07-20 16:05:17 +00:00
}
const hexWithOpacityResult = ColorUtils.hexWithOpacity(PRIMARY_500, num);
2026-07-29 08:29:29 +00:00
let tmp11;
if (!tmp4Result.isAndroid()) {
tmp11 = accessibilityLabel;
2026-07-20 16:05:17 +00:00
}
tmp4Result = PlatformUtils;
2026-07-29 08:29:29 +00:00
let tmp12;
if (!tmp4Result3.isAndroid()) {
2026-07-29 08:29:29 +00:00
tmp12 = customKeyboard;
2026-07-20 16:05:17 +00:00
}
tmp4Result3 = PlatformUtils;
2026-07-29 08:29:29 +00:00
let num2 = 2;
2026-07-20 16:05:17 +00:00
if (isThemeDarkResult) {
2026-07-29 08:29:29 +00:00
num2 = 1;
2026-07-20 16:05:17 +00:00
}
const tmp4Result4 = PlatformUtils;
const tmp13 = tmp9(12161)(onMaxHeightChanged);
return jsx(ChatInputNativeComponent.default, { accessible, accessibilityLabel: tmp11, children: tmp12, editable, keyboardAppearance: num2, keyboardType: "default", markAsSpoilerTitle, maxHeight: tmp9(12161)(onMaxHeightChanged), onBeginFocus, onEndBlur, onChangeContentSize, onSelectionOrTextChange, onTextFlushed, onPasteImage, onPasteCommand, onTapAction, onRequestSend, placeholder, placeholderColor: tmp3.placeholderColor.color, ref, selectionColor: hexWithOpacityResult, setNoExtractUI, shouldShowCursor, style: tmp3.style, textColor: tmp3.textColor.color, verticalInset });
2026-07-20 16:05:17 +00:00
});
forwardRefResult.displayName = "ChatInputNativeComponent";
const size = fn(2);
const result = size.fileFinishedImporting("modules/chat_input/native/ChatInputNativeComponent.tsx");
2026-07-20 16:05:17 +00:00
export default forwardRefResult;