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

104 lines
4.4 KiB
TypeScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 11621
// Function ID: 11622
2026-07-20 16:05:17 +00:00
// Name: ChatInputNativeComponent
2026-08-08 06:10:11 +00:00
// Dependencies: [32, 19, 17, 4119, 21, 4303, 712, 1236, 4239, 4153, 4151, 500, 11372, 11378, 11380, 2]
2026-07-20 16:05:17 +00:00
2026-08-08 06:10:11 +00:00
// Module 11621 (ChatInputNativeComponent)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
2026-07-29 08:29:29 +00:00
import importAllResult from "noop";
import isSyncedModeThemesEnabled from "isSyncedModeThemesEnabled";
2026-07-23 10:11:24 +00:00
import { jsx } from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
import set from "set";
import set from "get ActivityIndicator";
const require = arg1;
2026-07-29 08:29:29 +00:00
let c4 = importAllResult;
let obj = { style: { flex: 1 }, textColor: null, placeholderColor: null };
obj = { color: require("Themes").colors.TEXT_DEFAULT };
obj[1] = obj;
createCacheKey = { color: require("Themes").colors.TEXT_MUTED };
obj[2] = createCacheKey;
let closure_7 = createCacheKey.createStyles(obj);
2026-07-20 16:05:17 +00:00
const forwardRefResult = importAllResult.forwardRef((markAsSpoilerTitle, ref) => {
let accessibilityLabel;
let customKeyboard;
let editable;
let onBeginFocus;
let onChangeContentSize;
let onEndBlur;
let onMaxHeightChanged;
let onPasteCommand;
let onPasteImage;
let onRequestSend;
let onSelectionOrTextChange;
let onTapAction;
let onTextFlushed;
let placeholder;
let setNoExtractUI;
let shouldShowCursor;
let verticalInset;
markAsSpoilerTitle = markAsSpoilerTitle.markAsSpoilerTitle;
({ accessibilityLabel, customKeyboard, placeholder, editable } = markAsSpoilerTitle);
if (markAsSpoilerTitle === undefined) {
2026-07-29 08:29:29 +00:00
const intl = _require(1236).intl;
markAsSpoilerTitle = intl.string(_require(1236).t["gsI+xC"]);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
_require = undefined;
2026-07-20 16:05:17 +00:00
({ setNoExtractUI, shouldShowCursor, onBeginFocus, onEndBlur, onChangeContentSize, onMaxHeightChanged, onSelectionOrTextChange, onTextFlushed, onPasteImage, onPasteCommand, onTapAction, onRequestSend, verticalInset } = markAsSpoilerTitle);
2026-07-23 10:11:24 +00:00
const tmp3 = callback2();
2026-08-08 06:10:11 +00:00
let obj = _require(4239);
2026-07-20 16:05:17 +00:00
const theme = obj.useTheme();
2026-08-08 06:10:11 +00:00
const isThemeDarkResult = _require(4153).isThemeDark(theme);
const obj2 = _require(4153);
2026-07-29 08:29:29 +00:00
const unsafe_rawColors = importDefault(712).unsafe_rawColors;
if (isThemeDarkResult) {
let PRIMARY_500 = unsafe_rawColors.WHITE;
let tmp9 = tmp8;
} else {
PRIMARY_500 = unsafe_rawColors.PRIMARY_500;
tmp9 = tmp8;
}
let num = 0.6;
2026-07-20 16:05:17 +00:00
if (null != gradientPreset.gradientPreset) {
2026-07-29 08:29:29 +00:00
num = 0.8;
2026-07-20 16:05:17 +00:00
}
2026-08-08 06:10:11 +00:00
const obj3 = _require(4151);
2026-07-29 08:29:29 +00:00
let tmp4Result = tmp4(500);
let tmp11;
if (!tmp4Result.isAndroid()) {
tmp11 = accessibilityLabel;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp4Result = tmp4(500);
let tmp12;
if (!tmp4Result.isAndroid()) {
tmp12 = customKeyboard;
2026-07-20 16:05:17 +00:00
}
2026-08-08 06:10:11 +00:00
const hexWithOpacityResult = _require(4151).hexWithOpacity(PRIMARY_500, num);
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
}
2026-07-29 08:29:29 +00:00
const tmp4Result1 = _require(500);
2026-08-08 06:10:11 +00:00
const tmp13 = tmp9(11372)(onMaxHeightChanged);
_require = _require(11378).useShouldUseFabricChatInput();
2026-07-29 08:29:29 +00:00
obj = { accessibilityLabel: tmp11, children: tmp12, editable, keyboardAppearance: num2, keyboardType: str, markAsSpoilerTitle, maxHeight: tmp13, 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-23 10:11:24 +00:00
return jsx(callback(importAllResult.useState(() => {
2026-07-20 16:05:17 +00:00
if (callback) {
2026-07-23 10:11:24 +00:00
let _default = callback(outer1_2[14]).default;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
_default = outer1_8;
2026-07-20 16:05:17 +00:00
}
return _default;
2026-07-29 08:29:29 +00:00
}), 1)[0], { accessibilityLabel: tmp11, children: tmp12, editable, keyboardAppearance: num2, keyboardType: str, markAsSpoilerTitle, maxHeight: tmp13, 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
});
2026-07-23 10:11:24 +00:00
if (set.isAndroid()) {
let _default = require("__INTERNAL_VIEW_CONFIG").default;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
_default = require("get ActivityIndicator").requireNativeComponent("DCDChatInputLegacy");
2026-07-20 16:05:17 +00:00
}
forwardRefResult.displayName = "ChatInputNativeComponent";
2026-07-23 10:11:24 +00:00
const result = set.fileFinishedImporting("modules/chat_input/native/ChatInputNativeComponent.tsx");
2026-07-20 16:05:17 +00:00
export default forwardRefResult;