Files
2026-07-28 01:06:53 +03:00

155 lines
8.8 KiB
TypeScript

/* Metro module 9394; source: modules/oauth2/native/ApplicationEducation.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 9393, 4122, 1244, 3858, 9395, 8658, 7002, 4573, 9397, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseIsSocialLayerParentApplication from '../../applications/useIsSocialLayerParentApplication.tsx'; /* Metro dependency 9393 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun73263(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9580:6, offset: 0x01d655b2, size: 331 bytes, params: 8, frame: 21
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;
const env0_7 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const TEXT_MUTED = (Native).colors.TEXT_MUTED;
const env0_8 = Reflect.apply(createStyles, value, [{applicationEducation: {'flexDirection': 'column', 'gap': 16},
entry: {'flexDirection': 'row', 'alignItems': 'center', 'gap': 12}, entryText: {flex: 1},
entryIcon: {'width': 20, 'height': 20, tintColor: TEXT_MUTED}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/ApplicationEducation.tsx');
exports.default = ApplicationEducation;
function ApplicationEducationEntry({iconComponent, text}) { // fn#73264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9580:403, offset: 0x01d656fd, size: 158 bytes, params: 2, frame: 20
const styles = useStyles();
const r6 = iconComponent != null ? iconComponent({style: styles.entryIcon}) : null;
const Text = (TextModule).Text;
return (
<View style={styles.entry}>
{r6}
<Text variant="text-md/normal" style={styles.entryText}>
{text}
</Text>
</View>
);
}
function ApplicationEducation({application, accountScopes}) { // fn#73265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9580:713, offset: 0x01d6579b, size: 1410 bytes, params: 2, frame: 28
var r0;
var r1;
var r13;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var formatToPlainString;
var push;
var object2;
var object5;
var object6;
var object8;
var object11;
var object12;
var object13;
var jsxRuntimeEnv0_7Binding;
var items2;
const styles = useStyles();
const items3 = [];
const value3 = (UseIsSocialLayerParentApplication)(application);
const includes = accountScopes.includes;
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
const SDK_SOCIAL_LAYER = OAuth2Scopes.SDK_SOCIAL_LAYER;
if (Reflect.apply(includes, accountScopes, [SDK_SOCIAL_LAYER])) {
r0 = value3 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['3Mau0y'],
{applicationName: application.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ex4sMU);
push = items3.push;
object8 = {};
object8.iconComponent = (require(3858) /* metro dependency 3858: FriendsIcon */).FriendsIcon;
formatToPlainString = intl.formatToPlainString;
r1 = value3 ? Reflect.apply(formatToPlainString, intl, [t.z9peav,
{maxFriends: MAX_FRIENDS}]) : Reflect.apply(formatToPlainString, intl, [t.WNKzo9,
{maxFriends: MAX_FRIENDS}]);
object8.text = r1;
object11 = {};
object11.iconComponent = (require(9395) /* metro dependency 9395: ChatSmileIcon */).ChatSmileIcon;
string = intl.string;
r1 = value3 ? Reflect.apply(string, intl, [t.daY6xj]) : Reflect.apply(string, intl, [t.j7peBh]);
object11.text = r1;
object12 = {};
object12.iconComponent = (require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon;
string = intl.string;
r1 = value3 ? Reflect.apply(string, intl, [t['/bdaNN']]) : Reflect.apply(string, intl, [t['feD3+i']]);
object12.text = r1;
object13 = {};
object13.iconComponent = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
string = intl.string;
object13.text = value3 ? Reflect.apply(string, intl, [t.mSqazC]) : Reflect.apply(string, intl, [t.YFFVM1]);
Reflect.apply(push, items3, [object8, object11, object12, object13]);
r13 = r0;
} else if (accountScopes.includes((require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes.SDK_SOCIAL_LAYER_PRESENCE)) {
r0 = value3 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['3Mau0y'],
{applicationName: application.name}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ex4sMU);
push = items3.push;
object2 = {};
object2.iconComponent = (require(3858) /* metro dependency 3858: FriendsIcon */).FriendsIcon;
formatToPlainString = intl.formatToPlainString;
r1 = value3 ? Reflect.apply(formatToPlainString, intl, [t.z9peav,
{maxFriends: MAX_FRIENDS}]) : Reflect.apply(formatToPlainString, intl, [t.WNKzo9,
{maxFriends: MAX_FRIENDS}]);
object2.text = r1;
object5 = {};
object5.iconComponent = (require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon;
string = intl.string;
r1 = value3 ? Reflect.apply(string, intl, [t['/bdaNN']]) : Reflect.apply(string, intl, [t['feD3+i']]);
object5.text = r1;
object6 = {};
object6.iconComponent = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
string = intl.string;
object6.text = value3 ? Reflect.apply(string, intl, [t.mSqazC]) : Reflect.apply(string, intl, [t.YFFVM1]);
Reflect.apply(push, items3, [object2, object5, object6]);
r13 = r0;
} else {
r13 = undefined;
}
if (items3.length === 0) {
r0 = null;
} else {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
var viewBindingProps = {style: styles.applicationEducation};
items2 = [
r13 != null && r13.length > 0
? ((Text) => <Text variant="text-sm/normal" color="text-default">{r13}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
: null,
];
items2[1] = items3.map(_fun73266);
r0 = (
<>
<View {...viewBindingProps}>
{items2}
</View>
{((AuthorizeFormSeparator) => <AuthorizeFormSeparator />)((require(9397) /* metro dependency 9397: AuthorizeFormSeparator */).AuthorizeFormSeparator)}
</>
);
}
return r0;
function _fun73266({iconComponent, text}, a1) { // fn#73266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9580:2351, offset: 0x01d65d1d, size: 50 bytes, params: 3, frame: 15
return (
<ApplicationEducationEntry
iconComponent={iconComponent}
text={text}
key={a1}
/>
);
}
}
}
global.__d(_fun73263, 9394, [31, 27, 661, 33, 4501, 697, 9393, 4122, 1244, 3858, 9395, 8658, 7002, 4573, 9397,
2]) /* metro module 9394, dependencies: [31, 27, 661, 33, 4501, 697, 9393, 4122, 1244, 3858, 9395, 8658, 7002, 4573, 9397, 2] */;