/* Metro module 12678; source: modules/share/native/ShareEmbed.tsx; dependencies: [31, 27, 33, 4501, 697, 5461, 4573, 2] */
function _fun97145(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:6, offset: 0x02174796, size: 435 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.Image;
const env0_4 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'flexDirection': 'row', 'height': 80, 'backgroundColor': null, 'borderColor': null,
'borderWidth': 1, 'borderRadius': null, 'overflow': 'hidden'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object4.borderColor = BORDER_STRONG;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.container = object4;
object3.containerRevamp = {borderWidth: 0};
object3.thumbnail = {width: 80};
object3.contentContainer = {'flex': 1, 'flexDirection': 'column', 'justifyContent': 'center', 'paddingLeft': 12,
'paddingRight': 24};
object3.authorView = {'flexDirection': 'row', 'alignItems': 'center', 'marginBottom': 3};
const object6 = {'height': 16, 'width': 16, 'borderRadius': null, 'marginRight': 4};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.authorThumbnail = object6;
object3.loadingSpinner = {flex: 1};
const env0_8 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/native/ShareEmbed.tsx');
exports.default = ShareEmbed;
}
function ShareEmbed({embed, isLoadingEmbed, isRevamp}) { // fn#97146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:806, offset: 0x02174949, size: 425 bytes, params: 2, frame: 30
var r5;
var r0;
var jsxRuntimeEnv0_7Binding;
var items2;
const styles = useStyles();
const binding = styles;
const useMemo = binding.useMemo;
const items = [embed];
const value3 = Reflect.apply(useMemo, binding, [function() {
var r1;
if (embed != null) {
var property = embed.thumbnail;
var value2 = undefined;
r1 = property == null ? value2 : property.url;
r1 = r1 ?? (embed.image == null ? value2 : embed.image.url);
if (r1 != null) {
return {uri: r1};
}
}
}, items]);
const value4 = binding.useMemo(_fun97148, [isLoadingEmbed, styles]);
const value5 = binding.useMemo(_fun97149, [embed, styles]);
const value6 = binding.useMemo(_fun97150, [embed]);
const value7 = binding.useMemo(_fun97151, [embed, value6]);
const value8 = binding.useMemo(_fun97152, [embed]);
if (embed != null) {
var viewProps = {style: [styles.container, isRevamp ? styles.containerRevamp : undefined]};
if (isLoadingEmbed) {
r5 = value4;
} else {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
items2 = [value3 != null && ];
items2[1] = {value5}{value6}{value7}{value8};
r5 = <>{items2}>;
}
r0 = {r5};
} else if (isLoadingEmbed) {
var viewProps = {style: [styles.container, isRevamp ? styles.containerRevamp : undefined]};
if (isLoadingEmbed) {
r5 = value4;
} else {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
items2 = [value3 != null && ];
items2[1] = {value5}{value6}{value7}{value8};
r5 = <>{items2}>;
}
r0 = {r5};
} else {
r0 = null;
}
return r0;
}
function _fun97148() { // fn#97148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1045, offset: 0x02174b46, size: 71 bytes, params: 1, frame: 15
if (isLoadingEmbed) {
const ActivityIndicator = (require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator;
return ;
} else {
return null;
}
}
function _fun97149() { // fn#97149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1131, offset: 0x02174b8d, size: 219 bytes, params: 1, frame: 22
const author = embed?.author;
if (author == null) {
return null;
}
const r12 = author.proxy_icon_url ?? author.icon_url;
const r7 = r12 != null && ;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
{r7}
{author.name}
);
}
function _fun97150() { // fn#97150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1507, offset: 0x02174c68, size: 112 bytes, params: 1, frame: 17
var r0;
var value;
const embedBinding = embed;
const value2 = null;
const title = value2 == embedBinding ? undefined : embed.title;
if (value2 != title) {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = {title};
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function _fun97151() { // fn#97151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1731, offset: 0x02174cd8, size: 125 bytes, params: 1, frame: 17
var r0;
var value;
const embedBinding = embed;
const value2 = null;
const description = value2 == embedBinding ? undefined : embed.description;
if (value2 == env0_3) {
if (value2 != description) {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = {description};
r0 = value;
} else {
r0 = value2;
}
} else {
r0 = value2;
}
return r0;
}
function _fun97152() { // fn#97152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12868:1955, offset: 0x02174d55, size: 112 bytes, params: 1, frame: 17
var r0;
var value;
const embedBinding = embed;
const value2 = null;
const url = value2 == embedBinding ? undefined : embed.url;
if (value2 != url) {
value = environment.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = {url};
r0 = value;
} else {
r0 = value2;
}
return r0;
}