2026-08-05 07:35:12 +00:00
// Module ID: 10045
// Function ID: 10046
2026-07-20 16:05:17 +00:00
// Name: PostPurchaseFooter
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 17, 8684, 10046, 1369, 21, 4255, 712, 1581, 4460, 4107, 4665, 9464, 1236, 2351, 10047, 4251, 4224, 4225, 9927, 10048, 4071, 1358, 589, 8680, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 10045 (PostPurchaseFooter)
2026-07-29 08:29:29 +00:00
import GiftingBadgeIcon from "GiftingBadgeIcon" ;
import { View } from "HapticFeedbackTypes" ;
import map from "map" ;
import getTierForProgress from "getTierForProgress" ;
2026-07-23 10:11:24 +00:00
import { ContentDismissActionType } from "ContentDismissActionType" ;
2026-07-29 08:29:29 +00:00
import jsxProd from "UNSAFE_isDismissibleContentDismissed" ;
import createCacheKey from "createCacheKey" ;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c10 ;
2026-07-23 10:11:24 +00:00
let closure_6 ;
2026-07-29 08:29:29 +00:00
let error ;
let metroImportAll ;
let unpackModuleId ;
2026-07-23 10:11:24 +00:00
const require = arg1 ;
2026-07-20 16:05:17 +00:00
function PostPurchaseFooter ( onSendGift ) {
onSendGift = onSendGift . onSendGift ;
const items = [ onSendGift ] ;
const callback = React . useCallback ( ( ) = > {
2026-07-23 10:11:24 +00:00
let arr = outer1_1 ( outer1_2 [ 9 ] ) ;
2026-07-20 16:05:17 +00:00
arr = arr . pop ( ) ;
onSendGift ( ) ;
} , items ) ;
2026-07-29 08:29:29 +00:00
let obj = { style : callback6 ( importDefault ( 1581 ) ( ) . bottom ) . footer , children : null } ;
2026-07-20 16:05:17 +00:00
const callback1 = React . useCallback ( ( ) = > {
2026-08-05 07:35:12 +00:00
let arr = callback ( 4460 ) ;
2026-07-20 16:05:17 +00:00
arr = arr . pop ( ) ;
2026-08-05 07:35:12 +00:00
const rootNavigationRef = onSendGift ( 4107 ) . getRootNavigationRef ( ) ;
2026-07-29 08:29:29 +00:00
if ( rootNavigationRef != null ) {
2026-07-20 16:05:17 +00:00
rootNavigationRef . navigate ( "you" ) ;
}
} , [ ] ) ;
2026-07-29 08:29:29 +00:00
obj = { grow : true , variant : "primary" , icon : null , text : null , onPress : null } ;
obj = { size : "sm" , color : null } ;
obj [ 1 ] = importDefault ( 712 ) . colors . CONTROL_PRIMARY_TEXT_DEFAULT ;
2026-08-05 07:35:12 +00:00
obj [ 2 ] = callback4 ( onSendGift ( 9464 ) . GiftIcon , obj ) ;
2026-07-29 08:29:29 +00:00
const intl = onSendGift ( 1236 ) . intl ;
2026-08-05 07:35:12 +00:00
obj [ 3 ] = intl . string ( importDefault ( 2351 ) . g86YiI ) ;
2026-07-29 08:29:29 +00:00
obj [ 4 ] = callback ;
2026-08-05 07:35:12 +00:00
const items1 = [ callback4 ( onSendGift ( 4665 ) . Button , obj ) , ] ;
2026-07-29 08:29:29 +00:00
const obj1 = { grow : true , variant : "secondary" , text : null , onPress : null } ;
const intl2 = onSendGift ( 1236 ) . intl ;
2026-08-05 07:35:12 +00:00
obj1 [ 2 ] = intl2 . string ( importDefault ( 2351 ) [ "sa/cfM" ] ) ;
2026-07-29 08:29:29 +00:00
obj1 [ 3 ] = callback1 ;
2026-08-05 07:35:12 +00:00
items1 [ 1 ] = callback4 ( onSendGift ( 4665 ) . Button , obj1 ) ;
2026-07-29 08:29:29 +00:00
obj [ 1 ] = items1 ;
2026-07-20 16:05:17 +00:00
return callback5 ( View , obj ) ;
}
function InProgressScreen ( arg0 ) {
let currentTier ;
let description ;
let nextTier ;
let onSendGift ;
let progress ;
let progressBarTitle ;
let title ;
( { progress , title , progressBarTitle , description , currentTier , nextTier , onSendGift } = arg0 ) ;
2026-07-29 08:29:29 +00:00
const tmp = callback6 ( importDefault ( 1581 ) ( ) . bottom ) ;
let obj = { style : tmp.screenContainer , children : null } ;
obj = { style : tmp.content , children : null } ;
2026-08-05 07:35:12 +00:00
obj = { style : tmp.progressWrapper , children : callback4 ( importDefault ( 10047 ) , { progress , currentTier , nextTier , iconSize : 48 , title : progressBarTitle } ) } ;
2026-07-20 16:05:17 +00:00
const items = [ callback4 ( View , obj ) , ] ;
2026-07-29 08:29:29 +00:00
const obj1 = { style : tmp.messageSection , children : null } ;
2026-08-05 07:35:12 +00:00
const items1 = [ callback4 ( require ( 4251 ) /* Text */ . Text , { variant : "heading-xxl/bold" , style : tmp.centerText , children : title } ) , callback4 ( require ( 4251 ) /* Text */ . Text , { variant : "text-md/medium" , color : "text-subtle" , style : tmp.centerText , children : description } ) ] ;
2026-07-29 08:29:29 +00:00
obj1 [ 1 ] = items1 ;
2026-07-20 16:05:17 +00:00
items [ 1 ] = callback5 ( View , obj1 ) ;
2026-07-29 08:29:29 +00:00
obj [ 1 ] = items ;
2026-07-20 16:05:17 +00:00
const items2 = [ callback5 ( View , obj ) , callback4 ( PostPurchaseFooter , { onSendGift } ) ] ;
2026-07-29 08:29:29 +00:00
obj [ 1 ] = items2 ;
2026-07-20 16:05:17 +00:00
return callback5 ( View , obj ) ;
}
function LevelUpScreen ( arg0 ) {
let currentTier ;
let giftsToNextTier ;
let newTier ;
let nextTier ;
let onSendGift ;
let simulatedProgress ;
( { newTier , nextTier , giftsToNextTier } = arg0 ) ;
( { simulatedProgress , currentTier , onSendGift } = arg0 ) ;
2026-07-29 08:29:29 +00:00
const tmp3 = callback6 ( importDefault ( 1581 ) ( ) . bottom ) ;
2026-07-20 16:05:17 +00:00
const effect = React . useEffect ( ( ) = > {
2026-08-05 07:35:12 +00:00
const result = callback ( 4224 ) . triggerHapticFeedback ( callback2 ( 4225 ) . IMPACT_HEAVY ) ;
2026-07-20 16:05:17 +00:00
} , [ ] ) ;
2026-07-29 08:29:29 +00:00
let obj = { style : tmp3.screenContainer , children : null } ;
obj = { style : tmp3.content , children : null } ;
obj = { style : tmp3.levelUpIconWrapper , children : null } ;
let tmp7Result = null != newTier . simple_icon_url ;
if ( tmp7Result ) {
const obj1 = { icon : null , size : 140 } ;
obj1 [ 0 ] = newTier . simple_icon_url ;
2026-08-05 07:35:12 +00:00
tmp7Result = tmp7 ( tmp ( 9927 ) , obj1 ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj [ 1 ] = tmp7Result ;
const items = [ closure_10 ( View , obj ) , ] ;
const obj2 = { style : tmp3.levelUpBody , children : null } ;
2026-08-05 07:35:12 +00:00
const items1 = [ closure_10 ( importDefault ( 10048 ) , { progress : simulatedProgress , currentTier , newTier , style : tmp3.levelUpProgress } ) , ] ;
2026-07-29 08:29:29 +00:00
const obj4 = { style : tmp3.messageSection , children : null } ;
const obj5 = { variant : "heading-xxl/bold" , style : tmp3.centerText , children : null } ;
const intl = require ( 1236 ) /* getSystemLocale */ . intl ;
let str = newTier . name ;
if ( str == null ) {
str = "" ;
2026-07-20 16:05:17 +00:00
}
2026-08-05 07:35:12 +00:00
obj5 [ 2 ] = intl . format ( importDefault ( 2351 ) . k8MmO8 , { tierName : str } ) ;
const items2 = [ closure_10 ( require ( 4251 ) /* Text */ . Text , obj5 ) , ] ;
2026-07-29 08:29:29 +00:00
tmp7Result = null != nextTier && null != giftsToNextTier ;
if ( tmp7Result ) {
tmp7Result = giftsToNextTier > 0 ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if ( tmp7Result ) {
const obj6 = { variant : "text-md/normal" , color : "text-subtle" , style : null , children : null } ;
obj6 [ 2 ] = tmp3 . centerText ;
const intl2 = tmp9 ( 1236 ) . intl ;
const obj7 = { count : null , nextTierName : null } ;
obj7 [ 0 ] = giftsToNextTier ;
let str2 = nextTier . name ;
if ( str2 == null ) {
str2 = "" ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj7 [ 1 ] = str2 ;
2026-08-05 07:35:12 +00:00
obj6 [ 3 ] = intl2 . format ( tmp ( 2351 ) [ "6QVlxw" ] , obj7 ) ;
tmp7Result = tmp7 ( tmp9 ( 4251 ) . Text , obj6 ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items2 [ 1 ] = tmp7Result ;
obj4 [ 1 ] = items2 ;
2026-07-20 16:05:17 +00:00
items1 [ 1 ] = closure_11 ( View , obj4 ) ;
2026-07-29 08:29:29 +00:00
obj2 [ 1 ] = items1 ;
2026-07-20 16:05:17 +00:00
items [ 1 ] = closure_11 ( View , obj2 ) ;
2026-07-29 08:29:29 +00:00
obj [ 1 ] = items ;
const items3 = [ closure_11 ( View , obj ) , closure_10 ( PostPurchaseFooter , { onSendGift } ) ] ;
obj [ 1 ] = items3 ;
2026-07-20 16:05:17 +00:00
return closure_11 ( View , obj ) ;
}
2026-07-29 08:29:29 +00:00
( { getRemainingGiftsToNextTier : closure_6 , getTierForProgress : error , getNextTierForProgress : metroImportAll } = getTierForProgress ) ;
( { jsx : c10 , jsxs : unpackModuleId } = jsxProd ) ;
let closure_12 = createCacheKey . createStyles ( ( arg0 ) = > {
let obj = { screenContainer : { flex : 1 } , content : null , progressWrapper : null , messageSection : null , centerText : null , levelUpIconWrapper : null , levelUpBody : null , levelUpProgress : null , footer : null } ;
obj = { flex : 1 , alignItems : "center" , justifyContent : "center" , padding : importDefault ( 712 ) . space . PX_16 } ;
obj [ 1 ] = obj ;
obj = { padding : importDefault ( 712 ) . space . PX_16 , width : "100%" , marginBottom : importDefault ( 712 ) . space . PX_24 } ;
obj [ 2 ] = obj ;
obj [ 3 ] = { gap : importDefault ( 712 ) . space . PX_12 , alignItems : "center" , width : "100%" , paddingHorizontal : importDefault ( 712 ) . space . PX_16 } ;
obj [ 4 ] = { textAlign : "center" } ;
const obj1 = { gap : importDefault ( 712 ) . space . PX_12 , alignItems : "center" , width : "100%" , paddingHorizontal : importDefault ( 712 ) . space . PX_16 } ;
obj [ 5 ] = { paddingVertical : 26 , paddingHorizontal : 74 , marginBottom : importDefault ( 712 ) . space . PX_48 } ;
const obj2 = { paddingVertical : 26 , paddingHorizontal : 74 , marginBottom : importDefault ( 712 ) . space . PX_48 } ;
obj [ 6 ] = { gap : importDefault ( 712 ) . space . PX_12 , alignItems : "center" , width : "100%" } ;
obj [ 7 ] = { maxWidth : 260 } ;
const obj3 = { gap : importDefault ( 712 ) . space . PX_12 , alignItems : "center" , width : "100%" } ;
obj [ 8 ] = { width : "100%" , gap : importDefault ( 712 ) . space . PX_12 , paddingHorizontal : importDefault ( 712 ) . space . PX_16 , paddingBottom : importDefault ( 712 ) . space . PX_16 + arg0 } ;
2026-07-20 16:05:17 +00:00
return obj ;
} ) ;
2026-07-29 08:29:29 +00:00
let result = require ( "map" ) . fileFinishedImporting ( "modules/premium/native/gifting/GiftBadgePostPurchase.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default function GiftBadgePostPurchase ( arg0 ) {
let currentProgress ;
let onSendGift ;
( { currentProgress , onSendGift } = arg0 ) ;
const effect = React . useEffect ( ( ) = > {
2026-08-05 07:35:12 +00:00
let obj = callback ( 4071 ) ;
2026-07-29 08:29:29 +00:00
obj = { dismissAction : constants.INDIRECT_ACTION } ;
const result = obj . UNSAFE_markDismissibleContentAsDismissed ( callback ( 1358 ) . DismissibleContent . NEW_GIFTING_BADGES_COACHMARK , obj ) ;
2026-07-20 16:05:17 +00:00
} , [ ] ) ;
2026-07-29 08:29:29 +00:00
let obj = require ( 589 ) /* initialize */ ;
const items = [ map ] ;
2026-07-20 16:05:17 +00:00
const stateFromStores = obj . useStateFromStores ( items , ( ) = > {
2026-08-05 07:35:12 +00:00
badgeById = badgeById . getBadgeById ( callback ( 8680 ) . BadgeId . GIFTING ) ;
2026-07-20 16:05:17 +00:00
let tiers ;
2026-07-29 08:29:29 +00:00
if ( badgeById != null ) {
2026-07-20 16:05:17 +00:00
tiers = badgeById . tiers ;
}
return tiers ;
} ) ;
if ( null == stateFromStores ) {
return null ;
} else {
2026-07-29 08:29:29 +00:00
const tmp24 = callback2 ( stateFromStores , currentProgress ) ;
2026-07-20 16:05:17 +00:00
const sum = currentProgress + 1 ;
2026-07-29 08:29:29 +00:00
const tmp26 = callback2 ( stateFromStores , sum ) ;
2026-07-20 16:05:17 +00:00
let key ;
2026-07-29 08:29:29 +00:00
if ( tmp26 != null ) {
key = tmp26 . key ;
2026-07-20 16:05:17 +00:00
}
let key1 ;
2026-07-29 08:29:29 +00:00
if ( tmp24 != null ) {
key1 = tmp24 . key ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const tmp8 = callback3 ( stateFromStores , sum ) ;
const tmp10 = callback ( stateFromStores , sum ) ;
2026-07-20 16:05:17 +00:00
if ( key !== key1 ) {
2026-07-29 08:29:29 +00:00
if ( null != tmp26 ) {
obj = { simulatedProgress : null , currentTier : null , newTier : null , nextTier : null , giftsToNextTier : null , onSendGift : null } ;
obj [ 0 ] = sum ;
obj [ 1 ] = tmp24 ;
obj [ 2 ] = tmp26 ;
obj [ 3 ] = tmp8 ;
obj [ 4 ] = tmp10 ;
obj [ 5 ] = onSendGift ;
let tmp11Result = callback4 ( LevelUpScreen , obj ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp11Result ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if ( 1 === tmp10 ) {
const intl2 = tmp2 ( 1236 ) . intl ;
let str2 ;
if ( tmp8 != null ) {
str2 = tmp8 . name ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if ( str2 == null ) {
str2 = "" ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { title : null , description : null , progressBarTitle : null , progress : null , currentTier : null , nextTier : null , onSendGift : null } ;
const obj1 = { nextTier : null } ;
obj1 [ 0 ] = str2 ;
2026-08-05 07:35:12 +00:00
obj [ 0 ] = intl2 . formatToPlainString ( importDefault ( 2351 ) . KjdBPz , obj1 ) ;
2026-07-29 08:29:29 +00:00
const intl3 = tmp2 ( 1236 ) . intl ;
2026-08-05 07:35:12 +00:00
obj [ 1 ] = intl3 . string ( importDefault ( 2351 ) . oqDrEM ) ;
2026-07-29 08:29:29 +00:00
const intl4 = tmp2 ( 1236 ) . intl ;
2026-08-05 07:35:12 +00:00
obj [ 2 ] = intl4 . string ( importDefault ( 2351 ) [ "Ka5s+Q" ] ) ;
2026-07-29 08:29:29 +00:00
obj [ 3 ] = sum ;
obj [ 4 ] = tmp26 ;
obj [ 5 ] = tmp8 ;
obj [ 6 ] = onSendGift ;
2026-07-20 16:05:17 +00:00
let obj2 = obj ;
2026-07-29 08:29:29 +00:00
const tmp18 = tmp26 ;
const tmp19 = tmp8 ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj2 = { title : null , description : null , progressBarTitle : null , progress : null , currentTier : null , nextTier : null , onSendGift : null } ;
const intl5 = tmp2 ( 1236 ) . intl ;
2026-08-05 07:35:12 +00:00
obj2 [ 0 ] = intl5 . string ( importDefault ( 2351 ) [ "/rBQud" ] ) ;
2026-07-29 08:29:29 +00:00
const intl6 = tmp2 ( 1236 ) . intl ;
2026-08-05 07:35:12 +00:00
obj2 [ 1 ] = intl6 . string ( importDefault ( 2351 ) . DDQMlx ) ;
2026-07-29 08:29:29 +00:00
let name ;
if ( tmp24 != null ) {
name = tmp24 . name ;
2026-07-20 16:05:17 +00:00
}
let str = "" ;
2026-07-29 08:29:29 +00:00
if ( null != name ) {
const intl = tmp2 ( 1236 ) . intl ;
let name1 ;
if ( tmp24 != null ) {
name1 = tmp24 . name ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj3 = { tierName : null } ;
obj3 [ 0 ] = name1 ;
2026-08-05 07:35:12 +00:00
str = intl . formatToPlainString ( tmp27 ( 2351 ) . bwyQt8 , obj3 ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj2 [ 2 ] = str ;
obj2 [ 3 ] = sum ;
obj2 [ 4 ] = tmp26 ;
obj2 [ 5 ] = tmp8 ;
obj2 [ 6 ] = onSendGift ;
const tmp15 = tmp26 ;
const tmp16 = tmp8 ;
tmp27 = importDefault ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp11Result = callback4 ( InProgressScreen , obj2 ) ;
const tmp11 = callback4 ;
const tmp12 = InProgressScreen ;
2026-07-20 16:05:17 +00:00
}
} ;