decord/source/modules/chat_input/native/ChatInputNativeComponent.tsx
github-actions ecf26fc058 chore: update source for alpha 347.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
2026-09-16 07:03:15 +00:00

70 lines
3.3 KiB
TypeScript

// Module ID: 12393
// Function ID: 12394
// Name: chat_input/ChatInputNativeComponent
// Dependencies: [19, 4457, 21, 4638, 576, 1115, 4572, 4489, 4487, 1364, 12173, 12131, 2]
// Module 12393 (chat_input/ChatInputNativeComponent)
import nativeDefault from "native" /* 576 */;
import util from "util" /* 1115 */;
import PlatformUtils from "PlatformUtils" /* 1364 */;
import ColorUtils from "ColorUtils" /* 4487 */;
import shared from "shared" /* 4489 */;
import useTheme from "useTheme" /* 4572 */;
import ChatInputNativeComponent from "ChatInputNativeComponent" /* 12131 */;
import noop from "module_19" /* 19 */;
import ClientThemesBackgroundStore from "ClientThemesBackgroundStore" /* 4457 */;
require = fn;
const jsx = fn(21).jsx;
const createStyles = fn(4638);
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) => {
markAsSpoilerTitle = markAsSpoilerTitle.markAsSpoilerTitle;
({ accessible, accessibilityLabel, customKeyboard, placeholder, editable } = markAsSpoilerTitle);
if (markAsSpoilerTitle === undefined) {
const intl = util.intl;
markAsSpoilerTitle = intl.string(util.t["gsI+xC"]);
}
({ 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;
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) {
num = 0.8;
}
const hexWithOpacityResult = ColorUtils.hexWithOpacity(PRIMARY_500, num);
let tmp11;
if (!tmp4Result.isAndroid()) {
tmp11 = accessibilityLabel;
}
tmp4Result = PlatformUtils;
let tmp12;
if (!tmp4Result3.isAndroid()) {
tmp12 = customKeyboard;
}
tmp4Result3 = PlatformUtils;
let num2 = 2;
if (isThemeDarkResult) {
num2 = 1;
}
const tmp4Result4 = PlatformUtils;
const tmp13 = tmp9(12173)(onMaxHeightChanged);
return jsx(ChatInputNativeComponent.default, { accessible, accessibilityLabel: tmp11, children: tmp12, editable, keyboardAppearance: num2, keyboardType: "default", markAsSpoilerTitle, maxHeight: tmp9(12173)(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 size = fn(2);
const result = size.fileFinishedImporting("modules/chat_input/native/ChatInputNativeComponent.tsx");
export default forwardRefResult;