/* Metro module 15779; source: modules/avatar/native/components/AddAvatarModal.tsx; dependencies: [5, 57, 31, 27, 7624, 661, 33, 4501, 697, 5314, 6597, 1585, 566, 8403, 15780, 8421, 4660, 8400, 8402, 4573, 1244, 15789, 1305, 4578, 15777, 480, 5277, 5282, 5280, 2] */ import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */ 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 UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */ import TextStyles from '../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */ import UserProfileSettingsStore from '../../../user_profile/UserProfileSettingsStore.tsx'; /* Metro dependency 7624 */ 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 AnalyticsUtilsModule from '../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */ import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */ import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */ 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 HeaderActionButtonNativeModule from '../../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */ import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */ import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */ import * as VideoBackgroundModule from '../../../calls/native/VideoBackground.tsx'; /* Metro dependency 8421 */ import * as AddAvatarModalActionCreatorsModule from '../AddAvatarModalActionCreators.tsx'; /* Metro dependency 15777 */ function _fun121256(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15987:6, offset: 0x0254266b, size: 542 bytes, params: 8, frame: 27 const env0_0 = require; const AddAvatarModal2 = AddAvatarModal; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ConstantsModule; const Fonts = value.Fonts; const ModalAnimation = value.ModalAnimation; const env0_8 = value.UPLOAD_MEDIUM_SIZE; value = require(33) /* metro dependency 33 */; const env0_9 = value.jsx; const env0_10 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; const object2 = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center', 'paddingTop': null, 'alignItems': 'center'}; const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW; object2.backgroundColor = BACKGROUND_BASE_LOW; const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT; object2.paddingTop = NAV_BAR_HEIGHT + 32; object.container = object2; object.headerContainer = {'display': 'flex', 'alignItems': 'center'}; object.buttonContainer = {'marginHorizontal': 16, 'marginBottom': 16}; object.title = {'marginBottom': 8, 'textAlign': 'center'}; object.subtitle = {textAlign: 'center'}; object.errorContainer = {'alignSelf': 'center', 'paddingTop': 24}; const object4 = {}; const DISPLAY_MEDIUM = Fonts.DISPLAY_MEDIUM; const RED_400 = (Native).unsafe_rawColors.RED_400; copyDataProperties(object4, TextStyles(DISPLAY_MEDIUM, RED_400, 12), undefined); object.errorText = object4; const env0_11 = Reflect.apply(createStyles, value, [object]); const SLIDE_IN_OUT = ModalAnimation.SLIDE_IN_OUT; AddAvatarModal2.modalConfig = {animation: SLIDE_IN_OUT}; (FileImportTrackerModule).fileFinishedImporting('modules/avatar/native/components/AddAvatarModal.tsx'); exports.default = AddAvatarModal2; function AddAvatarScreen() { // fn#121257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15987:724, offset: 0x02542889, size: 1068 bytes, params: 1, frame: 38 var r0; var moduleValue2; var createPendingImage; const value2 = undefined; const styles = useStyles(); const [property, env0_0] = Module00057(ReactModule.useState(false), 2); const [property2, property3] = Module00057(ReactModule.useState(), 2); const bottom = (UseSafeAreaInsetsNative)().bottom; const useStateFromStores = FluxModule.useStateFromStores; let object = [UserProfileSettingsStore]; const pendingAvatar = Reflect.apply(useStateFromStores, FluxModule, [object, function() { return UserProfileSettingsStore.getPendingChanges().pendingAvatar; }]); if (property2 != null) { moduleValue2 = require(8403) /* metro dependency 8403: RecentAvatarUtils */; createPendingImage = moduleValue2.createPendingImage; object = {}; object.imageUri = (require(15780) /* metro dependency 15780: PresetAvatarSelect */).DEFAULT_AVATARS[property2]; object.description = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).generateAvatarDescription(); r0 = Reflect.apply(createPendingImage, moduleValue2, [object]); } else { r0 = value2; } const r11 = r0 ?? pendingAvatar; const value7 = VideoBackgroundModule.memoizedImageSource(r11 == null ? value2 : r11.imageUri); const items2 = [styles.container]; items2[1] = {paddingBottom: bottom > 0 ? bottom : 16}; const Text = (TextModule).Text; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; let string = intl.string; const XQRWvR = (require(1244) /* metro dependency 1244: indexNative */).t.XQRWvR; const items3 = [ {Reflect.apply(string, intl, [XQRWvR])} {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fH9TLT)} , ]; items3[1] = ((Component) => )(importDefault(15789) /* metro dependency 15789: TouchableUploadAvatar */); const LegacyText = (NativeModule).LegacyText; items3[2] = ( {property && intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XyLlVm)} ); const items4 = [ {items3} , ]; items4[1] = ((Component) => )(importDefault(15780) /* metro dependency 15780: PresetAvatarSelect */); const Button = (ButtonNativeModule).Button; string = intl.string; const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN; items4[2] = (