/* Metro module 10795; source: modules/go_live/native/MobileGoLiveActionSheet.tsx; dependencies: [57, 31, 4502, 4399, 4492, 1379, 1867, 1934, 1878, 4282, 661, 4291, 33, 4501, 697, 478, 4080, 10795, 1962, 480, 566, 10796, 10801, 6771, 6789, 4017, 8913, 8899, 8990, 1244, 2096, 10802, 10804, 6821, 4573, 3859, 8619, 6275, 6277, 6618, 6231, 7988, 7882, 676, 7987, 8617, 7892, 4578, 7954, 6808, 10794, 2] */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */ import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */ import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */ import ApplicationStreamingSettingsStore from '../../../stores/ApplicationStreamingSettingsStore.tsx'; /* Metro dependency 4399 */ import ApplicationStreamingStore from '../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */ import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */ import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */ import NativeView2 from '../../core/native/NativeView.tsx'; /* Metro dependency 6821 */ import MobileGoLiveUpsellExperiment from './MobileGoLiveUpsellExperiment.tsx'; /* Metro dependency 10801 */ 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 PlatformUtilsModule from '../../../external/discord_common/js/shared/utils/PlatformUtils.tsx'; /* Metro dependency 478 */ import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as BaseIconImageModule from '../../../design/components/Icon/native/BaseIconImage.tsx'; /* Metro dependency 3859 */ import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import * as StreamSettingsConstantsModule from '../StreamSettingsConstants.tsx'; /* Metro dependency 4282 */ import * as ConstantsModule2 from '../../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */ 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 ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */ import * as TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */ import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */ import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */ import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */ import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import * as TableSwitchRowNativeModule from '../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */ import * as TableRadioRowNativeModule from '../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */ import * as TableRadioGroupNativeModule from '../../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */ import * as MobilePhoneIconModule from '../../../design/components/Icon/native/redesign/generated/MobilePhoneIcon.tsx'; /* Metro dependency 8990 */ import * as UseScreenshareUtilsModule from '../../video_calls/native/useScreenshareUtils.tsx'; /* Metro dependency 10794 */ import * as GetStreamSettingsForPresetModule from '../utils/getStreamSettingsForPreset.tsx'; /* Metro dependency 10796 */ import * as SpeedometerIconModule from '../../../design/components/Icon/native/redesign/generated/SpeedometerIcon.tsx'; /* Metro dependency 10802 */ import * as ImageSparkleIconModule from '../../../design/components/Icon/native/redesign/generated/ImageSparkleIcon.tsx'; /* Metro dependency 10804 */ function _fun82920(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10981:6, offset: 0x01f06203, size: 667 bytes, params: 8, frame: 25 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; const ApplicationStreamPresets = (StreamSettingsConstantsModule).ApplicationStreamPresets; const createStyles = CreateStylesModule.createStyles; object = {}; const PX_24 = (Native).space.PX_24; object.wrapper = {gap: PX_24}; object.header = {textAlign: 'center'}; const PX_16 = (Native).space.PX_16; object.section = {marginHorizontal: PX_16}; const PX_4 = (Native).space.PX_4; object.highQualityLabel = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4}; object.nitroWheelIcon = {'bottom': -1, 'width': 22, 'height': 16}; const env0_17 = Reflect.apply(createStyles, CreateStylesModule, [object]); const PRESET_MOBILE_DEFAULT = ApplicationStreamPresets.PRESET_MOBILE_DEFAULT; const items2 = [{preset: PRESET_MOBILE_DEFAULT, enabled: true}]; object = {}; const PRESET_MOBILE_PERFORMANCE = ApplicationStreamPresets.PRESET_MOBILE_PERFORMANCE; object.preset = PRESET_MOBILE_PERFORMANCE; object.enabled = !PlatformUtilsModule.isIOS(); items2[1] = object; const PRESET_MOBILE_HIGH_QUALITY = ApplicationStreamPresets.PRESET_MOBILE_HIGH_QUALITY; items2[2] = {preset: PRESET_MOBILE_HIGH_QUALITY, enabled: true}; const env0_18 = items2.filter(function(a0) { return a0.enabled; }).map(function(a0) { return a0.preset; }); value = value.memo(MobileGoLiveActionSheet); (FileImportTrackerModule).fileFinishedImporting('modules/go_live/native/MobileGoLiveActionSheet.tsx'); exports.default = value; exports.showMobileGoLiveActionSheet = showMobileGoLiveActionSheet; function MobileGoLiveActionSheet() { // fn#82923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10981:842, offset: 0x01f064a9, size: 1951 bytes, params: 1, frame: 45 var r15; var NativeView; const Button = (ButtonNativeModule).Button; var object; var object4; var object5; const {preset, soundshareEnabled} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ApplicationStreamingSettingsStore], function() { return ApplicationStreamingSettingsStore.getState(); }); const {user, guildPremiumTier} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserStore, SelectedChannelStore, ChannelStore, GuildStore], _fun82926); let binding = activeSourceId2; const value4 = binding.useCallback(_fun82927, [user, guildPremiumTier]); const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ApplicationStreamingStore], _fun82928); const isStreaming = value5.isStreaming; const isStreaming2 = isStreaming; const activeSourceId = value5.activeSourceId; var activeSourceId2 = activeSourceId; const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() { return AccessibilityStore.useReducedMotion; }); let defaultImport = MobileGoLiveUpsellExperiment; const useConfig = defaultImport.useConfig; const goLiveUpsellVariant = Reflect.apply(useConfig, defaultImport, [{location: 'MobileGoLiveActionSheet'}]).goLiveUpsellVariant; const defaultImport2 = UseAnalyticsLocations; const MOBILE_GO_LIVE_ACTION_SHEET = (AnalyticsLocation).MOBILE_GO_LIVE_ACTION_SHEET; const analyticsLocations = defaultImport2(MOBILE_GO_LIVE_ACTION_SHEET).analyticsLocations; const styles = useStyles(); let useState = binding.useState; const PRESET_MOBILE_DEFAULT = ApplicationStreamPresets.PRESET_MOBILE_DEFAULT; let r9 = preset === PRESET_MOBILE_DEFAULT || preset === ApplicationStreamPresets.PRESET_MOBILE_PERFORMANCE; r9 = !r9 ? preset === ApplicationStreamPresets.PRESET_MOBILE_HIGH_QUALITY : r9; const value9 = Reflect.apply(useState, binding, [r9 && env0_18.includes(preset) && value4(preset) ? preset : ApplicationStreamPresets.PRESET_MOBILE_DEFAULT]); binding = isStreaming2; const value10 = binding(value9, 2); const property = value10[0]; const env0_8 = value10[1]; const binding3 = activeSourceId2; useState = binding3.useState; const value11 = binding(Reflect.apply(useState, binding3, [soundshareEnabled]), 2); const property2 = value11[0]; const env0_10 = value11[1]; const useSharedValue = ReanimatedRexportModule.useSharedValue; const PRESET_MOBILE_HIGH_QUALITY = ApplicationStreamPresets.PRESET_MOBILE_HIGH_QUALITY; const value12 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [!value4(PRESET_MOBILE_HIGH_QUALITY)]); const env0_11 = binding3.useCallback(_fun82930, [user, guildPremiumTier, activeSourceId, isStreaming]); const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider; const BottomSheet = (BottomSheetNativeModule).BottomSheet; const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView; const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView; const Text = (TextModule).Text; const intl = (IndexNativeModule).intl; const string = intl.string; const CrNjqp = (importDefault(2096) /* metro dependency 2096: MobileGoLiveActionSheetMessages */).CrNjqp; const items2 = [ {Reflect.apply(string, intl, [CrNjqp])} , ]; let section = styles.section; const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup; const tableRowGroupProps = {title: (IndexNativeModule).intl.string((importDefault(2096) /* metro dependency 2096: MobileGoLiveActionSheetMessages */)['/XSr8v']), hasIcons: false}; const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup; items2[1] = ( {env0_18.map(_fun82932)} ); let r13 = goLiveUpsellVariant === 'one-step' && value12.get() && {((Component) => )(importDefault(8617) /* metro dependency 8617: PremiumFeatureUpsell */)}; items2[2] = r13; r13 = goLiveUpsellVariant === 'two-step' && value12.get(); if (r13) { NativeView = NativeView2; r13 = (