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

97 lines
4.4 KiB
TypeScript
Raw Normal View History

2026-07-23 10:11:24 +00:00
// Module ID: 11357
// Function ID: 88279
2026-07-20 16:05:17 +00:00
// Name: ChatInputNativeComponent
2026-07-23 10:11:24 +00:00
// Dependencies: [57, 31, 27, 3942, 33, 4130, 689, 1212, 4066, 3976, 3974, 477, 11109, 11115, 11117, 2]
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
// Module 11357 (ChatInputNativeComponent)
import _slicedToArray from "_slicedToArray";
import importAllResult from "result";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import { jsx } from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
import set from "set";
import set from "get ActivityIndicator";
const require = arg1;
2026-07-20 16:05:17 +00:00
let obj = { style: { flex: 1 } };
2026-07-23 10:11:24 +00:00
obj = { color: require("_createForOfIteratorHelperLoose").colors.TEXT_DEFAULT };
2026-07-20 16:05:17 +00:00
obj.textColor = obj;
2026-07-23 10:11:24 +00:00
_createForOfIteratorHelperLoose = { color: require("_createForOfIteratorHelperLoose").colors.TEXT_MUTED };
obj.placeholderColor = _createForOfIteratorHelperLoose;
let closure_7 = _createForOfIteratorHelperLoose.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-23 10:11:24 +00:00
const intl = _require(1212).intl;
markAsSpoilerTitle = intl.string(_require(1212).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();
let obj = _require(4066);
2026-07-20 16:05:17 +00:00
const theme = obj.useTheme();
2026-07-23 10:11:24 +00:00
const isThemeDarkResult = _require(3976).isThemeDark(theme);
const obj2 = _require(3976);
const unsafe_rawColors = importDefault(689).unsafe_rawColors;
2026-07-20 16:05:17 +00:00
let num2 = 0.6;
if (null != gradientPreset.gradientPreset) {
num2 = 0.8;
}
2026-07-23 10:11:24 +00:00
const obj3 = _require(3974);
2026-07-20 16:05:17 +00:00
const tmp6 = isThemeDarkResult ? unsafe_rawColors.WHITE : unsafe_rawColors.PRIMARY_500;
2026-07-23 10:11:24 +00:00
const hexWithOpacityResult = _require(3974).hexWithOpacity(isThemeDarkResult ? unsafe_rawColors.WHITE : unsafe_rawColors.PRIMARY_500, num2);
2026-07-20 16:05:17 +00:00
let tmp8;
if (!obj4.isAndroid()) {
tmp8 = accessibilityLabel;
}
2026-07-23 10:11:24 +00:00
obj4 = _require(477);
2026-07-20 16:05:17 +00:00
let tmp9;
if (!obj5.isAndroid()) {
tmp9 = customKeyboard;
}
2026-07-23 10:11:24 +00:00
obj5 = _require(477);
2026-07-20 16:05:17 +00:00
let num3 = 2;
if (isThemeDarkResult) {
num3 = 1;
}
2026-07-23 10:11:24 +00:00
const obj6 = _require(477);
const tmp10 = importDefault(11109)(onMaxHeightChanged);
_require = _require(11115).useShouldUseFabricChatInput();
2026-07-20 16:05:17 +00:00
obj = { accessibilityLabel: tmp8, children: tmp9, editable, keyboardAppearance: num3, keyboardType: "default", markAsSpoilerTitle, maxHeight: tmp10, 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-23 10:11:24 +00:00
}), 1)[0], { accessibilityLabel: tmp8, children: tmp9, editable, keyboardAppearance: num3, keyboardType: "default", markAsSpoilerTitle, maxHeight: tmp10, 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;