decord/source/modules/chat_input/native/ChatInputNativeComponent.tsx
2026-08-15 05:55:55 +00:00

84 lines
4 KiB
TypeScript

// Module ID: 11414
// Function ID: 11415
// Name: ChatInputNativeComponent
// Dependencies: [19, 4195, 21, 4661, 712, 1236, 4310, 1363, 4223, 500, 11153, 11161, 2]
// Module 11414 (ChatInputNativeComponent)
import isSyncedModeThemesEnabled from "isSyncedModeThemesEnabled";
import { jsx } from "jsxProd";
import createCacheKey from "createCacheKey";
import importAllResult from "noop";
const require = arg1;
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_5 = createCacheKey.createStyles(obj);
const forwardRefResult = require("noop").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) {
const intl = require(1236) /* getSystemLocale */.intl;
markAsSpoilerTitle = intl.string(require(1236) /* getSystemLocale */.t["gsI+xC"]);
}
({ setNoExtractUI, shouldShowCursor, onBeginFocus, onEndBlur, onChangeContentSize, onMaxHeightChanged, onSelectionOrTextChange, onTextFlushed, onPasteImage, onPasteCommand, onTapAction, onRequestSend, verticalInset } = markAsSpoilerTitle);
const tmp3 = callback();
let obj = require(4310) /* useTheme */;
const theme = obj.useTheme();
const isThemeDarkResult = require(1363) /* AccessibilityAnnouncer */.isThemeDark(theme);
const obj2 = require(1363) /* AccessibilityAnnouncer */;
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;
if (null != gradientPreset.gradientPreset) {
num = 0.8;
}
const obj3 = require(4223) /* hexToRgba */;
let tmp4Result = tmp4(500);
let tmp11;
if (!tmp4Result.isAndroid()) {
tmp11 = accessibilityLabel;
}
tmp4Result = tmp4(500);
let tmp12;
if (!tmp4Result.isAndroid()) {
tmp12 = customKeyboard;
}
const hexWithOpacityResult = require(4223) /* hexToRgba */.hexWithOpacity(PRIMARY_500, num);
let num2 = 2;
if (isThemeDarkResult) {
num2 = 1;
}
const tmp4Result1 = require(500) /* set */;
obj = { accessibilityLabel: tmp11, children: tmp12, editable, keyboardAppearance: num2, keyboardType: str, markAsSpoilerTitle, maxHeight: tmp9(11153)(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 };
return jsx(require(11161) /* __INTERNAL_VIEW_CONFIG */.default, { accessibilityLabel: tmp11, children: tmp12, editable, keyboardAppearance: num2, keyboardType: str, markAsSpoilerTitle, maxHeight: tmp9(11153)(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 });
});
forwardRefResult.displayName = "ChatInputNativeComponent";
const result = require("jsxProd").fileFinishedImporting("modules/chat_input/native/ChatInputNativeComponent.tsx");
export default forwardRefResult;