/* Metro module 13213; source: modules/user_profile/native/UserProfileEffectEditButton.tsx; dependencies: [31, 27, 6816, 8471, 482, 33, 4501, 697, 8402, 8461, 4080, 13214, 1962, 1244, 13209, 5461, 5475, 10117, 8474, 1305, 8411, 2] */ function _fun100803(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13403:6, offset: 0x021f9a5b, size: 387 bytes, params: 8, frame: 23 var object3; const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importAll(31) /* metro dependency 31 */; const env0_4 = (require(27) /* metro dependency 27 */).View; const COLLECTIBLES_PREVIEW_SIZE = (require(6816) /* metro dependency 6816: Constants */).COLLECTIBLES_PREVIEW_SIZE; const SAMPLE_PROFILE_ASPECT_RATIO = (require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */).SAMPLE_PROFILE_ASPECT_RATIO; const env0_5 = (require(482) /* metro dependency 482: Constants */).NOOP; let value = require(33) /* metro dependency 33 */; const env0_6 = value.jsx; const env0_7 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object3 = {}; const object4 = {height: COLLECTIBLES_PREVIEW_SIZE, width: COLLECTIBLES_PREVIEW_SIZE}; object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs; const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED; object4.backgroundColor = BACKGROUND_MOD_MUTED; object4.overflow = 'hidden'; object3.profileEffectPreviewContainer = object4; object3.sampleProfile = {aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO, width: '100%'}; const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE; object3.noneIcon = {tintColor: TEXT_SUBTLE}; const env0_8 = Reflect.apply(createStyles, value, [object3]); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileEffectEditButton.tsx'); exports.default = UserProfileEffectEditButton; } function UserProfileEffectEditButton({displayProfile, user, pendingProfileEffect, guildId, isTryItOut}) { // fn#100804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13403:607, offset: 0x021f9bde, size: 1025 bytes, params: 2, frame: 27 var r0; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const t = (require(1244) /* metro dependency 1244: indexNative */).t; const styles = useStyles(); const profileCustomizationUtilsModule = require(8402) /* metro dependency 8402: ProfileCustomizationUtils */; const getProfilePreviewValue = profileCustomizationUtilsModule.getProfilePreviewValue; let object2 = {pendingValue: pendingProfileEffect}; object2.userValue = displayProfile == null || displayProfile._userProfile == null ? undefined : displayProfile._userProfile.profileEffect; object2.guildValue = displayProfile == null || displayProfile._guildMemberProfile == null ? undefined : displayProfile._guildMemberProfile.profileEffect; object2.guildId = guildId; const value3 = Reflect.apply(getProfilePreviewValue, profileCustomizationUtilsModule, [object2]); const {product, isFetching} = (require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */).useFetchCollectiblesProduct(value3?.skuId); const moduleValue3 = profileCustomizationUtilsModule; const useUserProfileEffect = moduleValue3.useUserProfileEffect; const r1 = pendingProfileEffect === undefined ? Reflect.apply(useUserProfileEffect, moduleValue3, [{user: user, guildId: guildId}]) : pendingProfileEffect; const value6 = r1.useCallback(_fun100805, [r1, guildId, user, isTryItOut]); const r10 = product?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PoWNfe); const r8 = guildId == null || r1 != null ? r10 : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ep5D4i, {label: r10}); const UserProfileEditFormButton = (require(13209) /* metro dependency 13209: UserProfileEditFormControls */).UserProfileEditFormButton; if (isFetching) { object2 = {}; object2.label = intl.string(t.wR5wOo); object2.buttonText = intl.string(t.MKDeyL); object2.onPress = NOOP; object2.leading = ((ActivityIndicator) => )((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator); object2.loading = true; object2.disabled = true; object2.hideArrow = true; r0 = object2; } else { object2 = {}; object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wR5wOo); object2.buttonText = r8; object2.accessibilityValue = {text: r8}; object2.onPress = value6; object2.leading = value3 != null ? {((Component) => )(importDefault(5475) /* metro dependency 5475: FastImage */)}{((Component) => )(importDefault(8474) /* metro dependency 8474: ProfileEffect */)} : ((Icon) => )((require(1305) /* metro dependency 1305: native */).Icon); r0 = object2; } return ; } function _fun100805() { // fn#100805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13403:1110, offset: 0x021f9fdf, size: 119 bytes, params: 1, frame: 17 let value = environment.__proto__; const defaultImport = importDefault(dependencyMap[10]); const openLazy = defaultImport.openLazy; value = require(dependencyMap[12]); value = value(dependencyMap[11], dependencyMap.paths); Reflect.apply(openLazy, defaultImport, [value, 'Profile Effect', {user: user, currentProfileEffect: env0_3, guildId: guildId, isTryItOut: isTryItOut}]); }