/* Metro module 9896; source: components_native/common/IconUploader.tsx; dependencies: [5, 31, 27, 661, 33, 4501, 4660, 6819, 1423, 9897, 5278, 1244, 2] */
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});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.View;
const env0_6 = value.Image;
const env0_7 = (require(661) /* metro dependency 661: Constants */).UPLOAD_MEDIUM_SIZE;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({uploadIcon: {'position': 'absolute',
'right': -7, 'top': -7}, avatar: {'height': 64, 'width': 64, 'borderRadius': 32}});
(require(2) /* metro dependency 2 */).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 object2;
var PressableOpacity;
var intl;
disabled = !(disabled === undefined) && disabled;
type = type === undefined ? 'avatar' : type;
const styles = useStyles();
const env0_2 = env0_4.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 {
object2 = {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;
}
}
}