106 lines
4.1 KiB
TypeScript
106 lines
4.1 KiB
TypeScript
// Metro module 9008 (f9009).
|
|
import { View } from "react-native";
|
|
import { MAX_FRIENDS } from "../../../Constants";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../_bundle/Module712";
|
|
import useIsSocialLayerParentApplication from "../../applications/useIsSocialLayerParentApplication";
|
|
import { OAuth2Scopes } from "../../../_bundle/Module8174";
|
|
import { intl, t } from "../../../intl/index.native";
|
|
import { FriendsIcon } from "../../../design/components/Icon/native/redesign/generated/FriendsIcon";
|
|
import { ChatSmileIcon } from "../../../design/components/Icon/native/redesign/generated/ChatSmileIcon";
|
|
import { GameControllerIcon } from "../../../design/components/Icon/native/redesign/generated/GameControllerIcon";
|
|
import { SettingsIcon } from "../../../design/components/Icon/native/redesign/generated/SettingsIcon";
|
|
import { Text } from "../../../design/components/Text/native/Text";
|
|
import { AuthorizeFormSeparator } from "./AuthorizeFormSeparator";
|
|
let useStyles;
|
|
const ApplicationEducationEntry = function ApplicationEducationEntry(props) {
|
|
const { iconComponent, text } = props;
|
|
const styles = useStyles();
|
|
return <View style={styles.entry}>
|
|
{iconComponent != null ? iconComponent({
|
|
style: styles.entryIcon
|
|
}) : null}
|
|
<Text variant="text-md/normal" style={styles.entryText}>{text}</Text>
|
|
</View>;
|
|
};
|
|
useStyles = createStyles({
|
|
applicationEducation: {
|
|
flexDirection: "column",
|
|
gap: 16
|
|
},
|
|
entry: {
|
|
flexDirection: "row",
|
|
alignItems: "center",
|
|
gap: 12
|
|
},
|
|
entryText: {
|
|
flex: 1
|
|
},
|
|
entryIcon: {
|
|
width: 20,
|
|
height: 20,
|
|
tintColor: Module712.colors.TEXT_MUTED
|
|
}
|
|
});
|
|
export default function ApplicationEducation(props) {
|
|
let r17;
|
|
const { application, accountScopes } = props;
|
|
const styles = useStyles();
|
|
const r16 = [];
|
|
const isSocialLayerParentApplication = useIsSocialLayerParentApplication(application);
|
|
if (accountScopes.includes(OAuth2Scopes.SDK_SOCIAL_LAYER)) {
|
|
const r107 = isSocialLayerParentApplication ? intl.formatToPlainString(t["3Mau0y"], {
|
|
applicationName: application.name
|
|
}) : intl.string(t.ex4sMU);
|
|
const r119 = {
|
|
iconComponent: FriendsIcon,
|
|
text: isSocialLayerParentApplication ? intl.formatToPlainString(t.z9peav, {
|
|
maxFriends: MAX_FRIENDS
|
|
}) : intl.formatToPlainString(t.WNKzo9, {
|
|
maxFriends: MAX_FRIENDS
|
|
})
|
|
};
|
|
r16.push(r119, {
|
|
iconComponent: ChatSmileIcon,
|
|
text: isSocialLayerParentApplication ? intl.string(t.daY6xj) : intl.string(t.j7peBh)
|
|
}, {
|
|
iconComponent: GameControllerIcon,
|
|
text: isSocialLayerParentApplication ? intl.string(t["/bdaNN"]) : intl.string(t["feD3+i"])
|
|
}, {
|
|
iconComponent: SettingsIcon,
|
|
text: isSocialLayerParentApplication ? intl.string(t.mSqazC) : intl.string(t.YFFVM1)
|
|
});
|
|
r17 = r107;
|
|
} else {
|
|
const r40 = accountScopes.includes(OAuth2Scopes.SDK_SOCIAL_LAYER_PRESENCE);
|
|
r17 = void 0;
|
|
if (r40) {
|
|
const r48 = isSocialLayerParentApplication ? intl.formatToPlainString(t["3Mau0y"], {
|
|
applicationName: application.name
|
|
}) : intl.string(t.ex4sMU);
|
|
r16.push({
|
|
iconComponent: FriendsIcon,
|
|
text: isSocialLayerParentApplication ? intl.formatToPlainString(t.z9peav, {
|
|
maxFriends: MAX_FRIENDS
|
|
}) : intl.formatToPlainString(t.WNKzo9, {
|
|
maxFriends: MAX_FRIENDS
|
|
})
|
|
}, {
|
|
iconComponent: GameControllerIcon,
|
|
text: isSocialLayerParentApplication ? intl.string(t["/bdaNN"]) : intl.string(t["feD3+i"])
|
|
}, {
|
|
iconComponent: SettingsIcon,
|
|
text: isSocialLayerParentApplication ? intl.string(t.mSqazC) : intl.string(t.YFFVM1)
|
|
});
|
|
r17 = r48;
|
|
}
|
|
}
|
|
return r16.length !== 0 ? <>
|
|
<View style={styles.applicationEducation}>
|
|
{r17 != null ? r17.length > 0 ? <Text variant="text-sm/normal" color="text-default">{r17}</Text> : null : null}
|
|
{r16.map((item, index) => <ApplicationEducationEntry key={index} iconComponent={item.iconComponent} text={item.text} />)}
|
|
</View>
|
|
<AuthorizeFormSeparator />
|
|
</> : null;
|
|
};
|