90 lines
5.0 KiB
TypeScript
90 lines
5.0 KiB
TypeScript
/* Metro module 12378; source: modules/markup/native/MarkupReactGameMentionRule.tsx; dependencies: [31, 33, 4501, 697, 1244, 4599, 10219, 5475, 9959, 9963, 4573, 2] */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as MarkupReactRulesNativeModule from '../MarkupReactRules.native.tsx'; /* Metro dependency 4599 */
|
|
|
|
function _fun94324(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12564:6, offset: 0x02113b6f, size: 312 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_3 = value.jsxs;
|
|
const env0_4 = value.jsx;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {'width': 16, 'height': 16, 'borderRadius': null, 'marginRight': 2};
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object.icon = object2;
|
|
const object3 = {};
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object3.backgroundColor = BORDER_SUBTLE;
|
|
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object3.paddingHorizontal = 2;
|
|
object.chip = object3;
|
|
const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
|
|
object.chipText = {color: BRAND_500};
|
|
const env0_5 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/markup/native/MarkupReactGameMentionRule.tsx');
|
|
exports.default = MarkupGameMention;
|
|
function MarkupGameMention({node, state}) { // fn#94325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12564:478, offset: 0x02113ca7, size: 543 bytes, params: 2, frame: 24
|
|
var r7;
|
|
const MarkupText = (MarkupReactRulesNativeModule).MarkupText;
|
|
var object;
|
|
var unknownGameIcon;
|
|
var noStyleAndInteraction;
|
|
const styles = useStyles();
|
|
const env0_1 = node.gameId;
|
|
const gameName = node.gameName;
|
|
const icon = node.icon;
|
|
const intl = (IndexNativeModule).intl;
|
|
const value3 = intl.string((IndexNativeModule).t['11pdXZ']);
|
|
let r1 = gameName != null && gameName !== '';
|
|
if (r1) {
|
|
const UnknownGameIcon = (require(10219) /* metro dependency 10219: UnknownGameIcon */).UnknownGameIcon;
|
|
unknownGameIcon = <UnknownGameIcon size="sm" style={styles.icon} />;
|
|
r1 = icon != null && icon !== '';
|
|
r7 = (
|
|
r1
|
|
? ((Component) => <Component style={styles.icon} source={{uri: icon}} />)(importDefault(5475) /* metro dependency 5475: FastImage */)
|
|
: unknownGameIcon
|
|
);
|
|
object = {};
|
|
noStyleAndInteraction = state.noStyleAndInteraction;
|
|
object.accessibilityRole = noStyleAndInteraction ? 'text' : 'button';
|
|
object.style = styles.chip;
|
|
object.color = state?.textColor;
|
|
noStyleAndInteraction = state.noStyleAndInteraction;
|
|
object.onPress = noStyleAndInteraction ? undefined : function() {
|
|
var defaultImport = importDefault(dependencyMap[8]);
|
|
var object = {};
|
|
var gameIdBinding = gameId;
|
|
object.gameId = gameIdBinding;
|
|
object.gameProfileModalChecks = {shouldOpenGameProfile: true, gameId: gameIdBinding};
|
|
object.source = require(dependencyMap[9]).GameProfileSources.GameMention;
|
|
object.sourceUserId = state.authorId;
|
|
defaultImport.openGameProfileModal(object);
|
|
};
|
|
return (
|
|
<MarkupText {...object} key={state.key}>
|
|
{r7}
|
|
{((Text) => <Text variant="text-sm/medium" style={styles.chipText}>{r1 ? gameName : value3}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
|
|
</MarkupText>
|
|
);
|
|
}
|
|
return (
|
|
<MarkupText color={state?.textColor} key={state.key}>
|
|
{'@'}
|
|
{value3}
|
|
</MarkupText>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun94324, 12378, [31, 33, 4501, 697, 1244, 4599, 10219, 5475, 9959, 9963, 4573,
|
|
2]) /* metro module 12378, dependencies: [31, 33, 4501, 697, 1244, 4599, 10219, 5475, 9959, 9963, 4573, 2] */;
|