111 lines
2.9 KiB
TypeScript
111 lines
2.9 KiB
TypeScript
// Metro module 5525 (f5526).
|
|
import { Image as Image2, View } from "react-native";
|
|
import { PremiumSubscriptionSKUs } from "../../premium/PremiumConstants";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../_bundle/Module712";
|
|
import Module5526 from "../../../_bundle/Module5526";
|
|
import Module5527 from "../../../_bundle/Module5527";
|
|
import Module5528 from "../../../_bundle/Module5528";
|
|
import Module5529 from "../../../_bundle/Module5529";
|
|
let c3397_6, c3397_7, useStyles;
|
|
const GameIcon = function GameIcon(props) {
|
|
let r31;
|
|
const { game, skuId, size = c3397_6.NORMAL, style } = props;
|
|
const styles = useStyles();
|
|
const r9 = {};
|
|
r9[c3397_6.NORMAL] = styles.normal;
|
|
r9[c3397_6.SMALL] = styles.small;
|
|
r9[c3397_6.SIZE_24] = styles.size24;
|
|
r9[c3397_6.LARGE] = styles.large;
|
|
const r23 = [styles.gameIcon, r9[size], style];
|
|
const r2 = skuId != null;
|
|
let r25 = void 0;
|
|
if (r2) {
|
|
L10: {
|
|
if (PremiumSubscriptionSKUs.TIER_0 === skuId) {
|
|
r31 = Module5526;
|
|
} else if (PremiumSubscriptionSKUs.TIER_1 === skuId) {
|
|
r31 = Module5527;
|
|
} else {
|
|
if (PremiumSubscriptionSKUs.TIER_2 !== skuId) {
|
|
const LEGACY = PremiumSubscriptionSKUs.LEGACY;
|
|
r31 = null;
|
|
if (LEGACY !== skuId) {
|
|
break L10;
|
|
}
|
|
}
|
|
r31 = Module5528;
|
|
}
|
|
}
|
|
r25 = r31;
|
|
}
|
|
let source = r25;
|
|
if (game != null) {
|
|
source = r25;
|
|
if (r25 == null) {
|
|
const iconURL = game.getIconURL(c3397_7[size]);
|
|
source = iconURL != null ? {
|
|
uri: iconURL
|
|
} : r25;
|
|
}
|
|
}
|
|
if (source == null) {
|
|
source = Module5529;
|
|
r23.push(styles.placeholder);
|
|
}
|
|
return <View style={[r23, styles.entityWrapper]}>
|
|
<Image2 style={r9[size]} source={source} />
|
|
</View>;
|
|
};
|
|
c3397_6 = {
|
|
SIZE_24: "size_24",
|
|
SMALL: "small",
|
|
NORMAL: "normal",
|
|
LARGE: "large"
|
|
};
|
|
const r35 = {};
|
|
r35[c3397_6.SIZE_24] = 24;
|
|
r35[c3397_6.SMALL] = 32;
|
|
r35[c3397_6.NORMAL] = 48;
|
|
r35[c3397_6.LARGE] = 80;
|
|
c3397_7 = r35;
|
|
useStyles = createStyles({
|
|
gameIcon: {
|
|
justifyContent: "center",
|
|
alignItems: "center"
|
|
},
|
|
size24: {
|
|
width: c3397_7.size_24,
|
|
height: c3397_7.size_24,
|
|
borderRadius: Module712.radii.sm
|
|
},
|
|
small: {
|
|
width: c3397_7.small,
|
|
height: c3397_7.small,
|
|
borderRadius: Module712.radii.sm
|
|
},
|
|
normal: {
|
|
width: c3397_7.normal,
|
|
height: c3397_7.normal,
|
|
borderRadius: Module712.radii.lg
|
|
},
|
|
large: {
|
|
width: c3397_7.large,
|
|
height: c3397_7.large,
|
|
borderRadius: Module712.radii.sm
|
|
},
|
|
placeholder: {
|
|
borderRadius: Module712.radii.none,
|
|
tintColor: Module712.colors.ICON_MUTED
|
|
},
|
|
entityWrapper: {
|
|
borderWidth: 1,
|
|
borderColor: Module712.colors.BORDER_SUBTLE,
|
|
overflow: "hidden"
|
|
}
|
|
});
|
|
GameIcon.Sizes = c3397_6;
|
|
export default GameIcon;
|
|
export { c3397_6 as GameIconSizes };
|
|
export { c3397_7 as GameIconImageSize };
|