74 lines
4.8 KiB
TypeScript
74 lines
4.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] */
|
|
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
|
|
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ApplicationCommandUtilsModule from './ApplicationCommandUtils.tsx'; /* Metro dependency 11752 */
|
|
|
|
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
|
|
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.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const MOBILE_FLOATING_ACCESSORY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND;
|
|
object.applicationHeaderWrapper = {'flexDirection': 'row', 'alignItems': 'center', 'height': 32,
|
|
'backgroundColor': null, 'paddingHorizontal': 16, backgroundColor: MOBILE_FLOATING_ACCESSORY_BACKGROUND};
|
|
const object3 = {'width': 16, 'height': 16, 'borderRadius': null, 'marginRight': 8};
|
|
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
object.applicationIcon = object3;
|
|
const env0_7 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).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 = (FluxModule).useStateFromStores([GuildMemberStore], _fun90968);
|
|
const applicationCommandsIconSource = (ApplicationCommandUtilsModule).getApplicationCommandsIconSource(section,
|
|
member);
|
|
const r8 = member?.nick != null ? member.nick : section?.name;
|
|
const intl = (IndexNativeModule).intl;
|
|
const formatToPlainString = intl.formatToPlainString;
|
|
const property = (IndexNativeModule).t['Ocw/sM'];
|
|
const object2 = {applicationName: r8};
|
|
const r6 = applicationCommandsIconSource != null && ((Component) => <Component style={styles.applicationIcon} source={applicationCommandsIconSource} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<View
|
|
style={styles.applicationHeaderWrapper}
|
|
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [property, object2])}
|
|
>
|
|
{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;
|
|
var guildMemberStoreBinding;
|
|
if (guildId != null) {
|
|
if (section?.botId != null) {
|
|
value3 = environment.__proto__;
|
|
guildMemberStoreBinding = GuildMemberStore;
|
|
return guildMemberStoreBinding.getMember(guildId, section.botId);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun90966, 11863, [31, 27, 1945, 33, 4501, 697, 566, 11752, 1244, 5475, 4573,
|
|
2]) /* metro module 11863, dependencies: [31, 27, 1945, 33, 4501, 697, 566, 11752, 1244, 5475, 4573, 2] */;
|