65 lines
2.6 KiB
TypeScript
65 lines
2.6 KiB
TypeScript
// Metro module 11901 (f11902).
|
|
import { useCallback } from "react";
|
|
import { Pressable, View } from "react-native";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../_bundle/Module712";
|
|
import useSafeAreaInsets_native from "../../safe_area/useSafeAreaInsets.native";
|
|
import ModalActionCreators from "../../../actions/ModalActionCreators";
|
|
import { openCollectiblesShopMobile } from "../CollectiblesActionCreators";
|
|
import AnalyticsLocation from "../../app_analytics/AnalyticsLocation";
|
|
import { ModalScreen } from "../../../design/components/Modal/native/ModalScreen.native";
|
|
import { intl, t } from "../../../intl/index.native";
|
|
import { XSmallIcon } from "../../../design/components/Icon/native/redesign/generated/XSmallIcon";
|
|
import { Text } from "../../../design/components/Text/native/Text";
|
|
import GiftingBadge_messages from "../../premium/gifting/GiftingBadge.messages";
|
|
import GiftBadgePostPurchase from "../../premium/native/gifting/GiftBadgePostPurchase";
|
|
const useStyles = createStyles((a0) => ({
|
|
header: {
|
|
position: "absolute",
|
|
top: 0,
|
|
left: 0,
|
|
right: 0,
|
|
height: a0 + 56,
|
|
paddingTop: a0,
|
|
zIndex: 1,
|
|
flexDirection: "row",
|
|
alignItems: "center",
|
|
justifyContent: "center"
|
|
},
|
|
closeButton: {
|
|
position: "absolute",
|
|
left: 0,
|
|
top: a0,
|
|
bottom: 0,
|
|
paddingHorizontal: Module712.space.PX_16,
|
|
justifyContent: "center"
|
|
},
|
|
closeIcon: {
|
|
tintColor: Module712.colors.MOBILE_TEXT_HEADING_PRIMARY
|
|
}
|
|
}));
|
|
export default function CollectiblesShopGiftBadgePostPurchaseModal(props) {
|
|
const giftBadgeProgress = props.giftBadgeProgress;
|
|
const styles = useStyles(useSafeAreaInsets_native().top);
|
|
const callback2 = useCallback(() => {
|
|
ModalActionCreators.pop();
|
|
}, []);
|
|
const callback = useCallback(() => {
|
|
openCollectiblesShopMobile({
|
|
analyticsLocations: [AnalyticsLocation.GIFTING_BADGE_POST_PURCHASE],
|
|
analyticsSource: AnalyticsLocation.GIFTING_BADGE_POST_PURCHASE
|
|
});
|
|
}, []);
|
|
return <ModalScreen>
|
|
<View style={styles.header}>
|
|
<Pressable onPress={callback2} accessibilityRole="button" accessibilityLabel={intl.string(t.cpT0Cq)} style={styles.closeButton}>
|
|
<XSmallIcon size="md" style={styles.closeIcon} />
|
|
</Pressable>
|
|
<Text accessibilityRole="header" aria-level="1" lineClamp={1} variant="redesign/heading-18/bold" color="mobile-text-heading-primary">
|
|
{intl.string(GiftingBadge_messages.roVAey)}
|
|
</Text>
|
|
</View>
|
|
<GiftBadgePostPurchase currentProgress={giftBadgeProgress} onSendGift={callback} />
|
|
</ModalScreen>;
|
|
};
|