44 lines
1.6 KiB
TypeScript
44 lines
1.6 KiB
TypeScript
// Metro module 8067 (f8068).
|
|
import { Image as Image2, View } from "react-native";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../_bundle/Module712";
|
|
import Module38 from "../../../_bundle/Module38";
|
|
import { CollectiblesItemType } from "../../../_bundle/Module1901";
|
|
import Module8068 from "../../../_bundle/Module8068";
|
|
import CutoutableAvatarDecoration from "./components/CutoutableAvatarDecoration";
|
|
let c5115_8 = 0.8333333333333334;
|
|
const useStyles = createStyles((a0) => ({
|
|
avatar: {
|
|
position: "absolute",
|
|
height: a0 * c5115_8,
|
|
width: a0 * c5115_8,
|
|
borderRadius: a0 * c5115_8 / 2,
|
|
opacity: 0.8,
|
|
backgroundColor: Module712.colors.BACKGROUND_BASE_LOWER
|
|
},
|
|
solidAvatar: {
|
|
opacity: 1
|
|
},
|
|
avatarDecoration: {
|
|
position: "absolute"
|
|
}
|
|
}));
|
|
export default function AvatarDecorationSampleV2(props) {
|
|
const { item, size } = props;
|
|
let avatarSource = props.avatarSource;
|
|
const { animate, threeTierBundle } = props;
|
|
const styles = useStyles(size);
|
|
Module38(item.type === CollectiblesItemType.AVATAR_DECORATION, "Item must be Avatar Decoration");
|
|
const style = [styles.avatar, (avatarSource != null || threeTierBundle === true) && styles.solidAvatar];
|
|
if (avatarSource == null) {
|
|
avatarSource = Module8068;
|
|
}
|
|
return <>
|
|
<Image2 style={style} resizeMode="contain" source={avatarSource} accessible={false} />
|
|
<View style={styles.avatarDecoration} accessibilityLabel={item.label}>
|
|
<CutoutableAvatarDecoration avatarDecoration={item} size={size} animate={animate} />
|
|
</View>
|
|
</>;
|
|
};
|
|
export const avatarPlaceholderSizeRatio = 0.8333333333333334;
|