/* Metro module 11789; source: modules/chat/native/SlowModeIndicator.tsx; dependencies: [31, 7080, 33, 4501, 697, 566, 7081, 3857, 10227, 5278, 4573, 2] */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import ToastActionCreators from '../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */ import SlowmodeStore from '../../../stores/SlowmodeStore.tsx'; /* Metro dependency 7080 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ 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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */ import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */ import * as SlowmodeUtilsModule from '../SlowmodeUtils.tsx'; /* Metro dependency 7081 */ import * as TimerIconModule from '../../../design/components/Icon/native/redesign/generated/TimerIcon.tsx'; /* Metro dependency 10227 */ function _fun90295(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11975:6, offset: 0x02033917, size: 257 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; const createStyles = CreateStylesModule.createStyles; const PX_4 = (Native).space.PX_4; const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [{container: {'alignItems': 'center', 'flexDirection': 'row'}, icon: {marginLeft: PX_4}}]); value = value.memo(SlowModeIndicator); (FileImportTrackerModule).fileFinishedImporting('modules/chat/native/SlowModeIndicator.tsx'); exports.default = value; function SlowModeIndicator({channel, hasTypingText, slowmodeType}) { // fn#90296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11975:272, offset: 0x02033a18, size: 348 bytes, params: 2, frame: 22 const styles = useStyles(); const slowmodeCooldownGuess = (require(566) /* metro dependency 566: flux */).useStateFromStores([SlowmodeStore], function() { return SlowmodeStore.getSlowmodeCooldownGuess(channel.id, slowmodeType); }); const slowmodeCooldownGuess2 = slowmodeCooldownGuess; const value2 = (SlowmodeUtilsModule).useCanBypassSlowmode(channel, slowmodeType); const binding = slowmodeCooldownGuess2; const value3 = binding.useMemo(_fun90298, [hasTypingText, value2, slowmodeCooldownGuess]); const value4 = binding.useCallback(_fun90299, [channel.rateLimitPerUser]); const PressableOpacity = (PressablesModule).PressableOpacity; const Text = (TextModule).Text; const text = ( {value3} ); const TimerIcon = (TimerIconModule).TimerIcon; return ( {text} ); function _fun90298() { // fn#90298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11975:477, offset: 0x02033b99, size: 79 bytes, params: 1, frame: 14 var r0; var value3; var moduleValue; if (hasTypingText) { if (env0_4) { value3 = environment.__proto__; moduleValue = require(7081) /* metro dependency 7081: SlowmodeUtils */; r0 = moduleValue.getSlowmodeIndicatorText(slowmodeCooldownGuess, env0_4); } else if (slowmodeCooldownGuess <= 0) { r0 = null; } else { value3 = environment.__proto__; moduleValue = require(7081) /* metro dependency 7081: SlowmodeUtils */; r0 = moduleValue.getSlowmodeIndicatorText(slowmodeCooldownGuess, env0_4); } } else { value3 = environment.__proto__; moduleValue = require(7081) /* metro dependency 7081: SlowmodeUtils */; r0 = moduleValue.getSlowmodeIndicatorText(slowmodeCooldownGuess, env0_4); } return r0; } function _fun90299() { // fn#90299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11975:563, offset: 0x02033be8, size: 116 bytes, params: 1, frame: 15 const value = environment.__proto__; const defaultImport = ToastActionCreators; const open = defaultImport.open; const object = {key: 'CHANNEL_SLOWMODE_INFO'}; const TimerIcon = (TimerIconModule).TimerIcon; object.IconComponent = TimerIcon; object.content = (require(7081) /* metro dependency 7081: SlowmodeUtils */).getSlowmodeDescription(channel.rateLimitPerUser); Reflect.apply(open, defaultImport, [object]); } } } global.__d(_fun90295, 11789, [31, 7080, 33, 4501, 697, 566, 7081, 3857, 10227, 5278, 4573, 2]) /* metro module 11789, dependencies: [31, 7080, 33, 4501, 697, 566, 7081, 3857, 10227, 5278, 4573, 2] */;