/* Metro module 4526; source: unknown; dependencies: [27] */ import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */ function _fun38643(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4704:6, offset: 0x010c5d62, size: 98 bytes, params: 8, frame: 16 let Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let env0_0 = ReactNativeModule.Image; let env0_1 = ReactNativeModule.processColor; const prepareMenu = function(a0, a1, a2) { var env0_0 = a1; var env0_1 = a2; var Object = global.Object; var object = {}; object.items = a0.items.map(_fun38645); return Object.assign({}, a0, object); }; exports.prepareHeaderBarButtonItems = function(a0, a1) { var env0_0 = a1; return a0?.map(_fun38647); }; function prepareMenu(a0, a1, a2) { // fn#38644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4704:135, offset: 0x010c5dc4, size: 71 bytes, params: 4, frame: 17 const env0_0 = a1; const env0_1 = a2; const Object = global.Object; const assign = Object.assign; const object = {}; object.items = a0.items.map(_fun38645); return Reflect.apply(assign, Object, [{}, a0, object]); function _fun38645(a0, a1) { // fn#38645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4704:209, offset: 0x010c5e0b, size: 401 bytes, params: 3, frame: 27 var r1; var r2; var r0; var value2; var value3; var assetSource2; var Object; var assign; var object; var value4; let icon = a0.icon; let value = undefined; const type = icon == null ? value : icon.type; const r10 = type !== 'sfSymbol' || a0.icon == null ? value : a0.icon.name; const r9 = type !== 'xcasset' || a0.icon == null ? value : a0.icon.name; icon = a0.icon; if ((icon == null ? value : icon.type) === 'imageSource') { value3 = environment.__proto__; assetSource2 = Image.resolveAssetSource(a0.icon.imageSource); r1 = value; r2 = assetSource2; } else { icon = a0.icon; if ((icon == null ? value : icon.type) !== 'templateSource') { r1 = value; r2 = value; } else { value2 = environment.__proto__; r1 = Image.resolveAssetSource(a0.icon.templateSource); r2 = value; } } if (a0.type === 'submenu') { Object = global.Object; assign = Object.assign; object = {sfSymbolName: r10, xcassetName: r9, imageSource: r2, templateSource: r1}; value4 = environment.__proto__; value = prepareMenu(a0, a1, importDefault); value = Reflect.apply(assign, Object, [{}, a0, object, value]); r0 = value; } else { r0 = global.Object.assign({}, a0, {sfSymbolName: r10, xcassetName: r9, imageSource: r2, templateSource: r1, menuId: '' + a1 + '-' + require + '-' + importDefault}); } return r0; } } function prepareHeaderBarButtonItems(a0, a1) { // fn#38646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4704:834, offset: 0x010c5f9c, size: 40 bytes, params: 3, frame: 12 const env0_0 = a1; return a0?.map(_fun38647); function _fun38647(a0, a1) { // fn#38647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4704:905, offset: 0x010c5fc4, size: 694 bytes, params: 3, frame: 32 var r9; var r12; var r8; var r3; var r1; var value3; var value4; var assetSource2; var Object; var assign; var object; var value5; var processColorBinding; var Object2; var assign2; var style; var object2; var value9; var style2; var style3; if (a0.type === 'spacing') { return a0; } let icon = a0.icon; let value = null; const value2 = undefined; if ((value == icon ? value2 : icon.type) === 'imageSource') { value4 = environment.__proto__; assetSource2 = Image.resolveAssetSource(a0.icon.imageSource); r9 = value2; r12 = assetSource2; } else { icon = a0.icon; if ((value == icon ? value2 : icon.type) !== 'templateSource') { r9 = value2; r12 = value2; } else { value3 = environment.__proto__; r9 = Image.resolveAssetSource(a0.icon.templateSource); r12 = value2; } } let titleStyle = a0.titleStyle; if (titleStyle) { Object = global.Object; assign = Object.assign; titleStyle = a0.titleStyle; object = {}; value5 = environment.__proto__; object.color = processColor(a0.titleStyle.color); r8 = Reflect.apply(assign, Object, [{}, titleStyle, object]); } else { r8 = value2; } const r7 = a0.tintColor ? processColor(a0.tintColor) : value2; let badge = a0.badge; if (badge) { Object = global.Object; assign = Object.assign; badge = a0.badge; Object2 = global.Object; assign2 = Object2.assign; style = a0.badge.style; object2 = {}; value9 = environment.__proto__; processColorBinding = processColor; style2 = a0.badge.style; object2.color = processColorBinding(value == style2 ? value2 : style2.color); processColorBinding = processColor; style3 = a0.badge.style; object2.backgroundColor = processColorBinding(value == style3 ? value2 : style3.backgroundColor); r3 = Reflect.apply(assign, Object, [{}, badge, {style: Reflect.apply(assign2, Object2, [{}, style, object2])}]); } else { r3 = value2; } Object = global.Object; assign = Object.assign; object = {imageSource: r12, templateSource: r9}; icon = a0.icon; object.sfSymbolName = (value == icon ? value2 : icon.type) !== 'sfSymbol' ? value2 : a0.icon.name; icon = a0.icon; object.xcassetName = (value == icon ? value2 : icon.type) !== 'xcasset' ? value2 : a0.icon.name; object.titleStyle = r8; object.tintColor = r7; object.badge = r3; const value11 = Reflect.apply(assign, Object, [{}, a0, object]); if (a0.type === 'button') { r1 = global.Object.assign({}, value11, {buttonId: '' + a1 + '-' + require}); } else if (a0.type !== 'menu') { r1 = value; } else { Object = global.Object; assign = Object.assign; object = {}; value = environment.__proto__; object.menu = prepareMenu(a0.menu, a1, require); value = Reflect.apply(assign, Object, [{}, value11, object]); r1 = value; } return r1; } } } global.__d(_fun38643, 4526, [27]) /* metro module 4526, dependencies: [27] */;