/* Metro module 11317; source: modules/messages/native/ChatBanner.tsx; dependencies: [31, 27, 4257, 4605, 11318, 661, 33, 4501, 697, 11319, 11320, 566, 21, 1357, 683, 4863, 6609, 4573, 1244, 4578, 6860, 7153, 5278, 5097, 8222, 2] */ import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */ import MobileVisualRefreshExperiment from '../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */ import GatewayConnectionStore from '../../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */ import ReadStateStore from '../../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */ import ThreadActionCreators from '../../threads/ThreadActionCreators.tsx'; /* Metro dependency 7153 */ import UseShowChannelOptInNotice from '../../opt_in_channels/useShowChannelOptInNotice.tsx'; /* Metro dependency 11319 */ import UseAllowedChatOverlays from '../useAllowedChatOverlays.tsx'; /* Metro dependency 11320 */ 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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */ import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */ import * as AppAnalyticsUtilsModule from '../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */ import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */ import * as OptInChannelsActionCreatorsModule from '../../opt_in_channels/OptInChannelsActionCreators.tsx'; /* Metro dependency 6609 */ import * as ThreadHooksModule from '../../threads/ThreadHooks.tsx'; /* Metro dependency 6860 */ import * as ChatOverlayConstantsModule from '../ChatOverlayConstants.tsx'; /* Metro dependency 11318 */ function _fun86326(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:6, offset: 0x01f90ec2, size: 713 bytes, params: 8, frame: 26 const env0_0 = require; const OptInChannelBanner2 = OptInChannelBanner; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactNativeModule; const StyleSheet = value.StyleSheet; const env0_4 = value.View; value = require(661) /* metro dependency 661: Constants */; const env0_8 = value.AnalyticsObjectTypes; const env0_9 = value.AnalyticsObjects; const env0_10 = value.AnalyticEvents; const env0_11 = value.AnalyticsSections; value = require(33) /* metro dependency 33 */; const env0_12 = value.jsx; const env0_13 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH; object.threadBannerContainer = {'alignSelf': 'stretch', 'minHeight': 60, 'flexDirection': 'row', 'paddingHorizontal': 16, 'paddingVertical': 12, 'alignItems': 'center', 'flexGrow': 0, 'zIndex': 100, backgroundColor: BACKGROUND_SURFACE_HIGH}; object.threadBannerTitle = {'flex': 1, 'lineHeight': 18}; object.threadBannerButton = {'flexGrow': 0, 'paddingVertical': 7, 'paddingHorizontal': 16, 'marginLeft': 16}; const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND; object.newMessageBar = {'backgroundColor': null, 'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden', 'zIndex': 100, 'minHeight': 45, backgroundColor: BACKGROUND_BRAND}; object.newMessageBarTextContainer = {'flex': 1, 'paddingLeft': 16, 'paddingVertical': 10}; object.newMessageBarCloseButton = {paddingHorizontal: 12}; const object5 = {'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center', 'overflow': 'hidden', 'padding': 8, 'paddingLeft': 16, 'paddingRight': 16, 'zIndex': 100}; const CHAT_BANNER_BG = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BANNER_BG; object5.backgroundColor = CHAT_BANNER_BG; object5.borderBottomWidth = StyleSheet.hairlineWidth; let CHAT_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BORDER; object5.borderBottomColor = CHAT_BORDER; object.optInChannelBannerContainer = object5; const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE; object.optInChannelBannerLegacyBorder = {borderBottomWidth: 1, borderBottomColor: BORDER_SUBTLE}; const object6 = {}; object6.borderTopWidth = StyleSheet.hairlineWidth; CHAT_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BORDER; object6.borderTopColor = CHAT_BORDER; object.topBorder = object6; object.optInChannelBannerText = {flex: 1}; object.optInChannelBannerButtonContainer = {'flexShrink': 0, 'marginLeft': 8}; const env0_14 = Reflect.apply(createStyles, value, [object]); (FileImportTrackerModule).fileFinishedImporting('modules/messages/native/ChatBanner.tsx'); exports.default = ChatBanner; exports.OptInChannelBanner = OptInChannelBanner2; function OptInChannelBanner({channel, topBorder}) { // fn#86327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1536, offset: 0x01f9118b, size: 439 bytes, params: 2, frame: 25 const styles = useStyles(); const value2 = (MobileVisualRefreshExperiment)('OptInChannelBanner'); ReactModule.useEffect(_fun86328, [channel]); const value3 = ReactModule.useCallback(_fun86329, [channel]); const items2 = [styles.optInChannelBannerContainer]; items2[1] = value2 ? null : styles.optInChannelBannerLegacyBorder; topBorder = topBorder ? styles.topBorder : null; items2[2] = topBorder; const Text = (TextModule).Text; const intl = (IndexNativeModule).intl; const text = ( {intl.string((IndexNativeModule).t.iOWmmB)} ); const Button = (ButtonNativeModule).Button; return ( {text}