92 lines
3.0 KiB
TypeScript
92 lines
3.0 KiB
TypeScript
// Metro module 11890 (f11891).
|
|
import { Pressable, View } from "react-native";
|
|
import { PremiumGiftStyles } from "../../PremiumConstants";
|
|
import { GIFT_STYLE_DESCRIPTIONS } from "../../gifting/PremiumGiftingConstants";
|
|
import Module11892 from "../../../../_bundle/Module11892";
|
|
import Module11893 from "../../../../_bundle/Module11893";
|
|
import Module11894 from "../../../../_bundle/Module11894";
|
|
import Module11895 from "../../../../_bundle/Module11895";
|
|
import Module11896 from "../../../../_bundle/Module11896";
|
|
import Module11897 from "../../../../_bundle/Module11897";
|
|
import Module11898 from "../../../../_bundle/Module11898";
|
|
import Module11899 from "../../../../_bundle/Module11899";
|
|
import Module11900 from "../../../../_bundle/Module11900";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../../_bundle/Module712";
|
|
import { intl } from "../../../../intl/index.native";
|
|
import PremiumGifting_messages from "../../gifting/PremiumGifting.messages";
|
|
import FastImage from "../../../../components_native/common/FastImage";
|
|
const r31 = {};
|
|
r31[PremiumGiftStyles.STANDARD_BOX] = Module11892;
|
|
r31[PremiumGiftStyles.CAKE] = Module11893;
|
|
r31[PremiumGiftStyles.CHEST] = Module11894;
|
|
r31[PremiumGiftStyles.COFFEE] = Module11895;
|
|
r31[PremiumGiftStyles.NITROWEEN_STANDARD] = {
|
|
uri: Module11896
|
|
};
|
|
r31[PremiumGiftStyles.SNOWGLOBE] = null;
|
|
r31[PremiumGiftStyles.BOX] = null;
|
|
r31[PremiumGiftStyles.CUP] = null;
|
|
r31[PremiumGiftStyles.SEASONAL_CAKE] = {
|
|
uri: Module11897
|
|
};
|
|
r31[PremiumGiftStyles.SEASONAL_CHEST] = {
|
|
uri: Module11898
|
|
};
|
|
r31[PremiumGiftStyles.SEASONAL_COFFEE] = {
|
|
uri: Module11899
|
|
};
|
|
r31[PremiumGiftStyles.SEASONAL_STANDARD_BOX] = {
|
|
uri: Module11900
|
|
};
|
|
let c8155_8 = r31;
|
|
const useStyles = createStyles((a0) => ({
|
|
container: {
|
|
width: 78,
|
|
height: 44,
|
|
justifyContent: "center",
|
|
marginEnd: Module712.space.PX_8,
|
|
marginStart: a0 === 0 ? 20 : 0
|
|
},
|
|
selected: {
|
|
position: "absolute",
|
|
borderColor: Module712.colors.TEXT_BRAND,
|
|
borderRadius: Module712.radii.sm,
|
|
borderWidth: 2,
|
|
flex: 1,
|
|
width: 78,
|
|
height: 44
|
|
},
|
|
image: {
|
|
width: 72,
|
|
height: 38,
|
|
alignSelf: "center"
|
|
}
|
|
}));
|
|
export default function GiftBackgroundSelectTile(props) {
|
|
const index = props.index;
|
|
let selected = props.selected;
|
|
const { giftStyle, onPress } = props;
|
|
const styles = useStyles(index);
|
|
const source = c8155_8[giftStyle];
|
|
let r23 = null;
|
|
if (source != null) {
|
|
const props2 = {
|
|
"aria-label": intl.formatToPlainString(PremiumGifting_messages["+utqaz"], {
|
|
giftStyle: intl.string(GIFT_STYLE_DESCRIPTIONS[giftStyle])
|
|
}),
|
|
"aria-selected": selected,
|
|
style: styles.container,
|
|
onPress,
|
|
children: null
|
|
};
|
|
if (selected) {
|
|
selected = <View style={styles.selected} />;
|
|
}
|
|
props2.children = [selected, <FastImage resizeMode="contain" style={styles.image} source={source} />];
|
|
r23 = <Pressable {...props2} />;
|
|
}
|
|
return r23;
|
|
};
|
|
export { c8155_8 as GIFT_STYLE_IMG };
|