63 lines
3.8 KiB
TypeScript
63 lines
3.8 KiB
TypeScript
/* Metro module 11863; source: modules/application_commands/native/ApplicationSectionHeader.tsx; dependencies: [31, 27, 1945, 33, 4501, 697, 566, 11752, 1244, 5475, 4573, 2] */
|
|
function _fun90966(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:6, offset: 0x0204ded3, size: 314 bytes, params: 8, frame: 23
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
importAll(31) /* metro dependency 31 */;
|
|
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
|
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object2 = {};
|
|
const MOBILE_FLOATING_ACCESSORY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND;
|
|
object2.applicationHeaderWrapper = {'flexDirection': 'row', 'alignItems': 'center', 'height': 32,
|
|
'backgroundColor': null, 'paddingHorizontal': 16, backgroundColor: MOBILE_FLOATING_ACCESSORY_BACKGROUND};
|
|
const object4 = {'width': 16, 'height': 16, 'borderRadius': null, 'marginRight': 8};
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
object2.applicationIcon = object4;
|
|
const env0_7 = Reflect.apply(createStyles, value, [object2]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationSectionHeader.tsx');
|
|
exports.default = _default_90967;
|
|
exports.APPLICATION_SECTION_HEADER_HEIGHT = 32;
|
|
}
|
|
|
|
function _default_90967({section, guildId}) { // fn#90967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:438, offset: 0x0204e00d, size: 373 bytes, params: 2, frame: 23
|
|
const styles = useStyles();
|
|
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun90968);
|
|
const applicationCommandsIconSource = (require(11752) /* metro dependency 11752: ApplicationCommandUtils */).getApplicationCommandsIconSource(section,
|
|
member);
|
|
const r8 = member?.nick != null ? member.nick : section?.name;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const formatToPlainString = intl.formatToPlainString;
|
|
const property = (require(1244) /* metro dependency 1244: indexNative */).t['Ocw/sM'];
|
|
const object = {applicationName: r8};
|
|
const r6 = applicationCommandsIconSource != null && ((Component) => <Component style={styles.applicationIcon} source={applicationCommandsIconSource} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
return (
|
|
<View
|
|
style={styles.applicationHeaderWrapper}
|
|
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [property, object])}
|
|
>
|
|
{r6}
|
|
<Text variant="eyebrow" color="interactive-text-default">
|
|
{r8}
|
|
</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _fun90968() { // fn#90968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12049:508, offset: 0x0204e182, size: 79 bytes, params: 1, frame: 13
|
|
var value3;
|
|
if (guildId != null) {
|
|
if (section?.botId != null) {
|
|
value3 = environment.__proto__;
|
|
return GuildMemberStore.getMember(guildId, section.botId);
|
|
}
|
|
}
|
|
}
|
|
|