decord/source/modules/avatar/native/components/TouchableUploadAvatar.tsx

78 lines
4.1 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16753
// Function ID: 16754
2026-07-20 16:05:17 +00:00
// Name: TouchableUploadAvatar
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 21, 4668, 712, 13380, 5438, 1236, 5454, 1297, 11997, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 16753 (TouchableUploadAvatar)
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import Button from "Button" /* 1297 */;
import PressableBase from "PressableBase" /* 5438 */;
import preloadDefault from "preload" /* 5454 */;
import registerAssetDefault from "registerAsset" /* 11997 */;
import registerAssetDefault2 from "registerAsset" /* 13380 */;
import { View } from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
noopAll;
2026-07-29 08:29:29 +00:00
({ jsx: c4, jsxs: c5 } = jsxProd);
createCacheKey = { avatarContainer: { display: "flex", paddingTop: 24 }, defaultLogoStyle: null, uploadedAvatarStyle: null, avatarWrapper: null, uploadAvatarWrapper: null, uploadAvatarIcon: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { tintColor: ThemesDefault.colors.INTERACTIVE_TEXT_DEFAULT, width: 96 };
2026-07-29 08:29:29 +00:00
createCacheKey[1] = createCacheKey;
createCacheKey[2] = { width: 200, height: 200, borderRadius: 100, position: "relative" };
2026-08-24 06:08:38 +00:00
createCacheKey[3] = { borderColor: ThemesDefault.colors.BORDER_MUTED, borderStyle: "dashed", borderWidth: 2, borderRadius: ThemesDefault.radii.round, width: 200, height: 200, justifyContent: "center", alignItems: "center", position: "relative", overflow: "visible" };
let obj1 = { borderColor: ThemesDefault.colors.BORDER_MUTED, borderStyle: "dashed", borderWidth: 2, borderRadius: ThemesDefault.radii.round, width: 200, height: 200, justifyContent: "center", alignItems: "center", position: "relative", overflow: "visible" };
createCacheKey[4] = { backgroundColor: ThemesDefault.colors.BACKGROUND_BRAND, borderRadius: ThemesDefault.radii.round, tintColor: ThemesDefault.colors.BACKGROUND_BASE_LOW, position: "absolute", right: 10, top: 10, width: 40, height: 40, flex: 1, justifyContent: "center" };
let obj2 = { backgroundColor: ThemesDefault.colors.BACKGROUND_BRAND, borderRadius: ThemesDefault.radii.round, tintColor: ThemesDefault.colors.BACKGROUND_BASE_LOW, position: "absolute", right: 10, top: 10, width: 40, height: 40, flex: 1, justifyContent: "center" };
createCacheKey[5] = { tintColor: ThemesDefault.colors.WHITE, alignSelf: "center" };
let closure_6 = createCacheKey.createStyles(createCacheKey);
let obj3 = { tintColor: ThemesDefault.colors.WHITE, alignSelf: "center" };
const result = require("set").fileFinishedImporting("modules/avatar/native/components/TouchableUploadAvatar.tsx");
2026-07-20 16:05:17 +00:00
export default function TouchableUploadAvatar(onSelectAvatar) {
({ avatarSource, showPendingAvatar } = onSelectAvatar);
if (showPendingAvatar === undefined) {
showPendingAvatar = false;
}
2026-08-24 06:08:38 +00:00
const tmp = callback3();
2026-07-20 16:05:17 +00:00
if (!showPendingAvatar) {
2026-08-24 06:08:38 +00:00
let tmp3 = registerAssetDefault2;
2026-07-20 16:05:17 +00:00
} else {
tmp3 = avatarSource;
}
if (showPendingAvatar) {
if (null != avatarSource) {
let defaultLogoStyle = tmp.uploadedAvatarStyle;
}
2026-07-29 08:29:29 +00:00
let obj = { style: null, children: null };
obj[0] = tmp.avatarContainer;
obj = { onPress: null, accessibilityRole: "button", accessibilityLabel: null, children: null };
obj[0] = onSelectAvatar.onSelectAvatar;
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[2] = intl.string(getSystemLocale.t["70lEQe"]);
2026-07-29 08:29:29 +00:00
obj = { style: null, children: null };
obj[0] = tmp.avatarWrapper;
2026-08-24 06:08:38 +00:00
obj1 = { resizeMode: "contain", style: null, source: null };
2026-07-29 08:29:29 +00:00
obj1[1] = defaultLogoStyle;
obj1[2] = tmp3;
2026-08-24 06:08:38 +00:00
const items = [callback(preloadDefault, obj1), ];
2026-07-29 08:29:29 +00:00
const obj2 = { style: null, children: null };
obj2[0] = tmp.uploadAvatarWrapper;
const obj3 = { size: null, source: null, style: null };
2026-08-24 06:08:38 +00:00
obj3[0] = Button.Icon.Sizes.MEDIUM;
obj3[1] = registerAssetDefault;
2026-07-29 08:29:29 +00:00
obj3[2] = tmp.uploadAvatarIcon;
2026-08-24 06:08:38 +00:00
obj2[1] = callback(Button.Icon, obj3);
2026-07-20 16:05:17 +00:00
items[1] = callback(View, obj2);
2026-07-29 08:29:29 +00:00
obj[1] = items;
obj[3] = callback2(View, obj);
2026-08-24 06:08:38 +00:00
obj[1] = callback(PressableBase.PressableOpacity, obj);
2026-07-20 16:05:17 +00:00
return callback(View, obj);
}
defaultLogoStyle = tmp.defaultLogoStyle;
};