/* Metro module 9896; source: components_native/common/IconUploader.tsx; dependencies: [5, 31, 27, 661, 33, 4501, 4660, 6819, 1423, 9897, 5278, 1244, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun77562(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:6, offset: 0x01e01481, size: 296 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Image;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
const env0_11 = (CreateStylesModule).createStyles({uploadIcon: {'position': 'absolute',
'right': -7, 'top': -7}, avatar: {'height': 64, 'width': 64, 'borderRadius': 32}});
(FileImportTrackerModule).fileFinishedImporting('components_native/common/IconUploader.tsx');
exports.default = IconUploader;
function IconUploader({disabled, makeURL = function(a0) {
}, type, name, icon, onUpload, style, iconStyle, onChangeIconPress}) { // fn#77563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:419, offset: 0x01e015a9, size: 587 bytes, params: 2, frame: 26
var r14;
var r0;
var regexp;
var object;
var PressableOpacity;
var intl;
disabled = !(disabled === undefined) && disabled;
type = type === undefined ? 'avatar' : type;
const styles = useStyles();
const env0_2 = ReactModule.useRef(false);
if (icon == null) {
r14 = makeURL(icon);
} else {
regexp = RegExp('^data:', '');
r14 = regexp.test(icon) ? icon : makeURL(icon);
}
const fragment = (
<>
{
type === 'guild'
? (
icon == null && name == null
? undefined
: ((Component) => )(importDefault(6819) /* metro dependency 6819: GuildIcon */)
)
: (
)
}
{
disabled
? null
: (
)
}
>
);
if (disabled) {
r0 = fragment;
} else {
object = {style: style};
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
{fragment}
);
}
return r0;
function _handleChangeIcon() { // fn#77565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:588, owner: IconUploader._handleChangeIcon, offset: 0x01e017f4, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun77567).apply(this, arguments);
function* _fun77567() { // fn#77567, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10082:645, offset: 0x01e01834, size: 165 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__;
if (importDefault != null) {
importDefault();
}
if (!dependencyMap.current) {
dependencyMap.current = true;
var value4 = env3_1(env3_2[6]);
yield value4.openImagePicker({size: env3_7});
var value5 = undefined;
if (false) {
return value5;
}
var base64 = value5.base64;
if (base64 != null) {
if (require != null) {
require(base64);
}
}
dependencyMap.current = false;
}
}
}
}
}
}
global.__d(_fun77562, 9896, [5, 31, 27, 661, 33, 4501, 4660, 6819, 1423, 9897, 5278, 1244,
2]) /* metro module 9896, dependencies: [5, 31, 27, 661, 33, 4501, 4660, 6819, 1423, 9897, 5278, 1244, 2] */;