62 lines
4.6 KiB
TypeScript
62 lines
4.6 KiB
TypeScript
/* Metro module 11027; source: modules/expression_picker/native/ExpressionPickerActionSheet.tsx; dependencies: [31, 1379, 6276, 11028, 33, 4017, 4022, 1583, 566, 11029, 4080, 1478, 1585, 5314, 477, 8575, 6275, 11030, 2] */
|
|
function _fun84441(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11213:6, offset: 0x01f4a61b, size: 221 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const env0_5 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_START_HEIGHT_RATIO;
|
|
const env0_6 = (require(11028) /* metro dependency 11028: StickerPickerConstants */).STICKER_FORMATS;
|
|
const value = require(33) /* metro dependency 33 */;
|
|
const env0_7 = value.jsx;
|
|
const env0_8 = value.Fragment;
|
|
const env0_9 = value.jsxs;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/expression_picker/native/ExpressionPickerActionSheet.tsx');
|
|
exports.default = ExpressionPickerActionSheet;
|
|
}
|
|
|
|
function ExpressionPickerActionSheet({channelId, hideGifFavorites, onDismiss, onPressEmoji, onPressSticker, onPressGIF, visibleTabs, initialGifQuery}) { // fn#84442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11213:333, offset: 0x01f4a6f8, size: 601 bytes, params: 2, frame: 32
|
|
var r0;
|
|
var jsxRuntimeEnv0_8Binding;
|
|
var items2;
|
|
const value3 = onPressGIF.useRef(null);
|
|
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
|
|
const useKeyboardTypeModule = require(4022) /* metro dependency 4022: useKeyboardType */;
|
|
const useKeyboardContextForType = useKeyboardTypeModule.useKeyboardContextForType;
|
|
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
|
|
const EXPRESSION = KeyboardTypes.EXPRESSION;
|
|
const value5 = Reflect.apply(useKeyboardContextForType, useKeyboardTypeModule, [EXPRESSION]);
|
|
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
|
return ChannelStore.getChannel(channelId);
|
|
});
|
|
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)({ignoreKeyboard: true}).height;
|
|
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
|
|
const NAV_BAR_HEIGHT_MULTILINE = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT_MULTILINE;
|
|
const value6 = height - NAV_BAR_HEIGHT_MULTILINE - top;
|
|
if (channel === undefined) {
|
|
r0 = null;
|
|
} else {
|
|
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
|
items2 = [(require(477) /* metro dependency 477: PlatformUtils */).isIOS() && ((Component) => <Component animatedSheetIndex={value4} />)(importDefault(8575) /* metro dependency 8575: PortalKeyboardFooterIOSIos */)];
|
|
items2[1] = ((BottomSheet) => <BottomSheet scrollable animatedIndex={value4} startHeight={height * ACTION_SHEET_START_HEIGHT_RATIO} containerHeight={value6} onDismiss={onDismiss}>{((Component) => <Component bottomSheetRef={value3} bottomSheetIndex={value4} channel={channel} expressionType={value5} hideGifFavorites={hideGifFavorites} onPressEmoji={function(a0) {
|
|
onPressEmoji(a0);
|
|
dismissSheet();
|
|
}} onPressGIF={function(a0) {
|
|
onPressGIF(a0);
|
|
dismissSheet();
|
|
}} onPressSticker={function(a0) {
|
|
onPressSticker(a0);
|
|
dismissSheet();
|
|
}} visibleTabs={visibleTabs} initialGifQuery={initialGifQuery} stickerFormats={STICKER_FORMATS} height={value6} />)(importDefault(11030) /* metro dependency 11030: ExpressionPicker */)}</BottomSheet>)((require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet);
|
|
r0 = <>{items2}</>;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function dismissSheet() { // fn#84444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11213:682, owner: ExpressionPickerActionSheet.dismissSheet, offset: 0x01f4a951, size: 63 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
(require(11029) /* metro dependency 11029: KeyboardUtils */).dismissKeyboard();
|
|
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
|
}
|
|
|