// Module ID: 14511 // Function ID: 14512 // Name: UserProfileNameplateEditButton // Dependencies: [19, 17, 1991, 6009, 502, 21, 4478, 709, 586, 8084, 14512, 4445, 14513, 2008, 14495, 1233, 8535, 1296, 8100, 2] // Exports: default // Module 14511 (UserProfileNameplateEditButton) import ThemesDefault from "Themes" /* 709 */; import closure_3 from "noop" /* 19 */; import get_ActivityIndicator from "get ActivityIndicator" /* 17 */; import closure_6 from "trackCommunicationDisabled" /* 1991 */; import { COLLECTIBLES_PREVIEW_SIZE } from "ARBITRARY_LARGE_OFFSET" /* 6009 */; import { NOOP } from "sum" /* 502 */; import { jsx } from "jsxProd" /* 21 */; import createCacheKey from "createCacheKey" /* 4478 */; const require = arg1; ({ ActivityIndicator: c4, View: c5 } = get_ActivityIndicator); createCacheKey = { previewContainer: null, noneIcon: null }; createCacheKey = { height: COLLECTIBLES_PREVIEW_SIZE, width: COLLECTIBLES_PREVIEW_SIZE, borderRadius: ThemesDefault.radii.xs, overflow: "hidden" }; createCacheKey[0] = createCacheKey; createCacheKey[1] = { tintColor: ThemesDefault.colors.TEXT_SUBTLE }; let closure_9 = createCacheKey.createStyles(createCacheKey); let obj1 = { tintColor: ThemesDefault.colors.TEXT_SUBTLE }; const result = require("set").fileFinishedImporting("modules/user_profile/native/UserProfileNameplateEditButton.tsx"); export default function UserProfileNameplateEditButton(user) { user = user.user; ({ pendingNameplate, guildId } = user); dependencyMap = undefined; let nameplate; const tmp = callback(); dependencyMap = tmp2; let obj = user(586); const items = [closure_6]; const stateFromStores = obj.useStateFromStores(items, () => { let member = null; if (closure_2) { member = closure_1_6.getMember(guildId, user.id); } return member; }); obj1 = user(8084); obj = { pendingValue: pendingNameplate, userValue: null, guildValue: null, guildId: null }; const collectibles = user.collectibles; nameplate = undefined; if (collectibles != null) { nameplate = collectibles.nameplate; } obj[1] = nameplate; let nameplate1; if (stateFromStores != null) { const collectibles2 = stateFromStores.collectibles; if (collectibles2 != null) { nameplate1 = collectibles2.nameplate; } } obj[2] = nameplate1; obj[3] = guildId; const profilePreviewValue = obj1.getProfilePreviewValue(obj); let skuId; if (profilePreviewValue != null) { skuId = profilePreviewValue.skuId; } const fetchNameplate = user(14512).useFetchNameplate(skuId); ({ nameplateProduct, nameplateData, nameplateRecord, isFetching } = fetchNameplate); if (null != guildId) { let nameplate2; if (stateFromStores != null) { const collectibles4 = stateFromStores.collectibles; if (collectibles4 != null) { nameplate2 = collectibles4.nameplate; } } nameplate = nameplate2; } else { const collectibles3 = user.collectibles; if (collectibles3 != null) { nameplate = collectibles3.nameplate; } } if (undefined !== pendingNameplate) { nameplate = pendingNameplate; } const items1 = [user, nameplate, guildId]; if (isFetching) { obj = { label: null, buttonText: null, onPress: null, leading: null, loading: true, disabled: true, hideArrow: true }; const intl4 = tmp3(1233).intl; obj[0] = intl4.string(tmp3(1233).t.x5CoXR); const intl5 = tmp3(1233).intl; obj[1] = intl5.string(tmp3(1233).t.MKDeyL); obj[2] = NOOP; obj[3] = ; return jsx(tmp3(14495).UserProfileEditFormButton, { label: null, buttonText: null, onPress: null, leading: null, loading: true, disabled: true, hideArrow: true }); } else { let name; if (nameplateProduct != null) { name = nameplateProduct.name; } if (name == null) { const intl = tmp3(1233).intl; name = intl.string(tmp3(1233).t.PoWNfe); } let formatToPlainStringResult = name; if (tmp2) { formatToPlainStringResult = name; if (null == nameplate) { const intl2 = tmp3(1233).intl; obj1 = { label: null }; obj1[0] = name; formatToPlainStringResult = intl2.formatToPlainString(tmp3(1233).t.ep5D4i, obj1); } } const obj2 = { label: null, buttonText: null, accessibilityValue: null, onPress: null, leading: null }; const intl3 = tmp3(1233).intl; obj2[0] = intl3.string(tmp3(1233).t.x5CoXR); obj2[1] = formatToPlainStringResult; const obj3 = { text: null }; obj3[0] = formatToPlainStringResult; obj2[2] = obj3; obj2[3] = tmp12; if (null != nameplateData) { if (null != nameplateRecord) { if (null != nameplateProduct) { const obj4 = { style: null, children: null }; obj4[0] = tmp.previewContainer; const obj5 = { nameplate: null, fullOpacity: true, isSquarePreview: true }; obj5[0] = nameplateData; obj4[1] = tmp15(guildId(8535), obj5); let tmp15Result = tmp15(closure_5, obj4); } obj2[4] = tmp15Result; return tmp15(tmp3(14495).UserProfileEditFormButton, obj2); } } const obj6 = { source: null, style: null }; obj6[0] = guildId(8100); obj6[1] = tmp.noneIcon; tmp15Result = tmp15(tmp3(1296).Icon, obj6); } };