65 lines
5.3 KiB
TypeScript
65 lines
5.3 KiB
TypeScript
/* Metro module 11773; source: modules/chat_input/native/ChatInputNativeComponent.tsx; dependencies: [31, 27, 3964, 33, 4501, 697, 1244, 4048, 4002, 4000, 477, 11533, 11539, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import ClientThemesBackgroundStore from '../../client_themes/ClientThemesBackgroundStore.tsx'; /* Metro dependency 3964 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
|
|
import * as ColorUtilsModule from '../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
|
|
import * as SharedModule from '../../../design/shared.tsx'; /* Metro dependency 4002 */
|
|
import * as UseThemeModule from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
|
|
function _fun90157(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11959:6, offset: 0x0202e2e5, size: 357 bytes, params: 8, frame: 24
|
|
var value4;
|
|
var property;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const requireNativeComponent = (ReactNativeModule).requireNativeComponent;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {};
|
|
object.style = {flex: 1};
|
|
const TEXT_DEFAULT = (Native).colors.TEXT_DEFAULT;
|
|
object.textColor = {color: TEXT_DEFAULT};
|
|
const TEXT_MUTED = (Native).colors.TEXT_MUTED;
|
|
object.placeholderColor = {color: TEXT_MUTED};
|
|
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
value = value.forwardRef(_fun90158);
|
|
if (PlatformUtilsModule.isAndroid()) {
|
|
property = (require(11539) /* metro dependency 11539: ChatInputNativeComponent */).default;
|
|
} else {
|
|
value4 = requireNativeComponent('DCDChatInput');
|
|
}
|
|
value.displayName = 'ChatInputNativeComponent';
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/chat_input/native/ChatInputNativeComponent.tsx');
|
|
exports.default = value;
|
|
function _fun90158({accessibilityLabel, customKeyboard, placeholder, editable, markAsSpoilerTitle, setNoExtractUI, shouldShowCursor, onBeginFocus, onEndBlur, onChangeContentSize, onMaxHeightChanged, onSelectionOrTextChange, onTextFlushed, onPasteImage, onPasteCommand, onTapAction, onRequestSend, verticalInset}, a1) { // fn#90158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11959:317, offset: 0x0202e44a, size: 655 bytes, params: 3, frame: 38
|
|
var r22;
|
|
var intl;
|
|
if (markAsSpoilerTitle !== undefined) {
|
|
r22 = markAsSpoilerTitle;
|
|
} else {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r22 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['gsI+xC']);
|
|
}
|
|
const styles = useStyles();
|
|
const color = styles.textColor.color;
|
|
const color2 = styles.placeholderColor.color;
|
|
const isThemeDark2 = (SharedModule).isThemeDark((UseThemeModule).useTheme());
|
|
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
|
|
const unsafe_rawColors = (Native).unsafe_rawColors;
|
|
const value8 = Reflect.apply(hexWithOpacity, ColorUtilsModule,
|
|
[isThemeDark2 ? unsafe_rawColors.WHITE : unsafe_rawColors.PRIMARY_500,
|
|
ClientThemesBackgroundStore.gradientPreset != null ? 0.8 : 0.6]);
|
|
const r27 = PlatformUtilsModule.isAndroid() ? undefined : accessibilityLabel;
|
|
return ((Component) => <Component accessibilityLabel={r27} children={PlatformUtilsModule.isAndroid() ? undefined : customKeyboard} editable={editable} keyboardAppearance={isThemeDark2 ? 1 : 2} keyboardType={PlatformUtilsModule.isAndroid() ? undefined : 'default'} markAsSpoilerTitle={r22} maxHeight={(importDefault(11533) /* metro dependency 11533: useChatInputMaxHeight */)(onMaxHeightChanged)} onBeginFocus={onBeginFocus} onEndBlur={onEndBlur} onChangeContentSize={onChangeContentSize} onSelectionOrTextChange={onSelectionOrTextChange} onTextFlushed={onTextFlushed} onPasteImage={onPasteImage} onPasteCommand={onPasteCommand} onTapAction={onTapAction} onRequestSend={onRequestSend} placeholder={placeholder} placeholderColor={color2} ref={a1} selectionColor={value8} setNoExtractUI={setNoExtractUI} shouldShowCursor={shouldShowCursor} style={styles.style} textColor={color} verticalInset={verticalInset} />)(env0_6);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun90157, 11773, [31, 27, 3964, 33, 4501, 697, 1244, 4048, 4002, 4000, 477, 11533, 11539,
|
|
2]) /* metro module 11773, dependencies: [31, 27, 3964, 33, 4501, 697, 1244, 4048, 4002, 4000, 477, 11533, 11539, 2] */;
|