154 lines
8.9 KiB
TypeScript
154 lines
8.9 KiB
TypeScript
/* Metro module 8641; source: modules/messages/native/emoji/ExpressionGuildDetails.tsx; dependencies: [31, 27, 6820, 33, 4501, 697, 6819, 1423, 5475, 4573, 1244, 5278, 8640, 8642, 1305, 2] */
|
|
import GuildBadge from '../../../guild/native/GuildBadge.tsx'; /* Metro dependency 8642 */
|
|
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 JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ExpressionSourceRecordModule from '../../../emojis/records/ExpressionSourceRecord.tsx'; /* Metro dependency 6820 */
|
|
|
|
function _fun68141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:6, offset: 0x01c40ad1, size: 518 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = JsxRuntimeModule;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.Fragment;
|
|
const env0_7 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
object.guildDetailsContainer = {flexDirection: 'column'};
|
|
object.guildDetailsContent = {'flexDirection': 'row', 'marginTop': 8, 'alignItems': 'center'};
|
|
const object3 = {'width': 40, 'height': 40, 'borderRadius': null, 'marginRight': 12};
|
|
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
object.guildIcon = object3;
|
|
object.guildNameAndOnlineMembers = {flexDirection: 'column'};
|
|
object.guildNameWrapper = {'flexDirection': 'row', 'alignItems': 'center', 'marginRight': 32};
|
|
object.guildPartnerIcon = {marginRight: 8};
|
|
object.guildDescriptionSection = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 4};
|
|
const object6 = {'width': 4, 'height': 4, 'borderRadius': null, 'marginRight': 8, 'marginLeft': 8};
|
|
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
|
object6.backgroundColor = BACKGROUND_MOD_MUTED;
|
|
object.dotSeparator = object6;
|
|
const object7 = {'borderRadius': null, 'borderColor': null, 'borderWidth': 1, 'paddingHorizontal': 4,
|
|
'paddingBottom': 2};
|
|
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
|
object7.borderColor = BORDER_STRONG;
|
|
object.joinGuildButton = object7;
|
|
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
|
const ExpressionGuildDetails2 = ExpressionGuildDetails;
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/emoji/ExpressionGuildDetails.tsx');
|
|
exports.default = ExpressionGuildDetails2;
|
|
exports.ExpressionGuildDetails = ExpressionGuildDetails2;
|
|
function ExpressionGuildDetails({guild, title, hasJoinedGuild, showingJoinGuildCta}) { // fn#68142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:959, offset: 0x01c40cd7, size: 1149 bytes, params: 2, frame: 39
|
|
var r7;
|
|
var r11;
|
|
var defaultImport;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var jsxRuntimeEnv0_6Binding;
|
|
var items5;
|
|
const styles = useStyles();
|
|
const fromGuildType = ExpressionSourceGuildRecord.createFromGuildType(guild);
|
|
const isDiscoverable2 = fromGuildType.isDiscoverable();
|
|
if (isDiscoverable2) {
|
|
r7 = ((Component) => <Component style={styles.guildIcon} guild={fromGuildType} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
|
|
} else if (hasJoinedGuild) {
|
|
r7 = ((Component) => <Component style={styles.guildIcon} guild={fromGuildType} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
|
|
} else {
|
|
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
|
r7 = ((Component) => <Component style={styles.guildIcon} source={defaultImport.getGuildIconSource({id: guild.id,
|
|
icon: guild.icon, canAnimate: true,
|
|
size: 32})} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
|
}
|
|
const Text = (TextModule).Text;
|
|
const text = (
|
|
<Text variant="eyebrow" color="text-default">
|
|
{title}
|
|
</Text>
|
|
);
|
|
const Icon = (NativeModule).Icon;
|
|
const Sizes = Icon.Sizes;
|
|
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
|
|
const view = (
|
|
<View style={styles.guildNameWrapper}>
|
|
<GuildBadge
|
|
guild={guild}
|
|
style={styles.guildPartnerIcon}
|
|
size={REFRESH_SMALL_16}
|
|
disableColor
|
|
/>
|
|
<Text variant="text-md/bold" color="mobile-text-heading-primary">
|
|
{guild.name}
|
|
</Text>
|
|
</View>
|
|
);
|
|
if (isDiscoverable2) {
|
|
if (fromGuildType.presenceCount != null) {
|
|
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
|
|
items5 = [
|
|
<Text variant="text-xs/medium" color="text-default">
|
|
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['LC+S+m'],
|
|
{membersOnline: fromGuildType.presenceCount})}
|
|
</Text>,
|
|
];
|
|
items5[1] = <View style={styles.dotSeparator} />;
|
|
items5[2] = (
|
|
hasJoinedGuild || showingJoinGuildCta
|
|
? (
|
|
<Text variant="text-xs/medium" color="text-default">
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.inyJqO)}
|
|
</Text>
|
|
)
|
|
: ((PressableOpacity) => <PressableOpacity style={styles.joinGuildButton} onPress={onPress_68143}><Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riu2R5)}</Text></PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)
|
|
);
|
|
r11 = (
|
|
<>
|
|
{items5}
|
|
</>
|
|
);
|
|
} else {
|
|
r11 = (
|
|
<Text variant="text-xs/medium" color="text-default">
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H29mx4)}
|
|
</Text>
|
|
);
|
|
}
|
|
} else {
|
|
r11 = (
|
|
<Text variant="text-xs/medium" color="text-default">
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H29mx4)}
|
|
</Text>
|
|
);
|
|
}
|
|
return (
|
|
<View style={styles.guildDetailsContainer}>
|
|
{text}
|
|
<View style={styles.guildDetailsContent}>
|
|
{r7}
|
|
<View style={styles.guildNameAndOnlineMembers}>
|
|
{view}
|
|
<View style={styles.guildDescriptionSection}>
|
|
{r11}
|
|
</View>
|
|
</View>
|
|
</View>
|
|
</View>
|
|
);
|
|
function ExpressionGuildDetailsOnPress() { // fn#68143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:2196, owner: ExpressionGuildDetails.onPress, offset: 0x01c41154, size: 50 bytes, params: 1, frame: 11
|
|
let value = environment.__proto__;
|
|
value = require(8640) /* metro dependency 8640: GuildUtils */;
|
|
return value.handleJoinGuild(guild.id);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun68141, 8641, [31, 27, 6820, 33, 4501, 697, 6819, 1423, 5475, 4573, 1244, 5278, 8640, 8642, 1305,
|
|
2]) /* metro module 8641, dependencies: [31, 27, 6820, 33, 4501, 697, 6819, 1423, 5475, 4573, 1244, 5278, 8640, 8642, 1305, 2] */;
|