// Metro module 14066 (f14067). import { useCallback } from "react"; import { StyleSheet, View, Pressable } from "react-native"; import AccessibilityStore from "../../../a11y/AccessibilityStore"; import { QuestsExperimentLocations } from "../../QuestConstants"; import * as _ReanimatedRexport from "../../../reanimated/ReanimatedRexport"; import ReanimatedRexport, { useSharedValue, useAnimatedStyle } from "../../../reanimated/ReanimatedRexport"; import { createStyles } from "../../../../design/components/Styles/native/createStyles"; import Module712 from "../../../../_bundle/Module712"; import * as _timing from "../../../../design/animation/reanimated/timing/timing"; import * as _timingPresets from "../../../../design/animation/reanimated/timing/timingPresets"; import { getBountyCtaInfo } from "./BountyCtaHelpers"; import { getScaledImageUrl } from "../../lib/AssetUtils"; import { useButtonPressAnimationProps } from "../../../../design/components/Button/native/ButtonHooks.native"; import { useGetQuestImpressionId } from "../../lib/analytics/ContentImpressionTrackerHooks"; import { openAdGameLinkDirectly } from "../../utils/QuestPlatformUtils"; import { AdCreativeType } from "../../../../_bundle/Module6013"; import { QuestContentCTA } from "../../lib/analytics/AnalyticsTypes"; import { QuestContent } from "../../../../_bundle/Module5038"; import { BackgroundBlurView } from "../../../../design/components/experimental/BackgroundBlurView/native/BackgroundBlurView.native"; import FastImage from "../../../../components_native/common/FastImage"; import { Text } from "../../../../design/components/Text/native/Text"; import { Button } from "../../../../design/components/Button/native/Button.native"; import { useIsBountiesModalTransitionsRefactorEnabled } from "../../experiments/BountiesModalTransitionsRefactorExperiment"; import { useStateFromStores } from "../../../../_bundle/Module589"; import { useVisibilityTransition } from "./useVisibilityTransition"; import AnimatedEnterExitItem from "../../../../design/components/AnimatedEnterExitItem/native/AnimatedEnterExitItem"; let _excluded, AnimatedComponent, useStyles, n, s2, __initData; const BountiesModalAdvertiserCtaContent = function BountiesModalAdvertiserCtaContent(props) { const { bounty, sourceQuestContent, opacityStyle, transformStyle } = props; const styles = useStyles(); const bountyCtaInfo = getBountyCtaInfo(bounty); const uri = bountyCtaInfo.iconImageUri != null ? getScaledImageUrl({ assetUrl: bountyCtaInfo.iconImageUri, width: 40, height: 40 }) : void 0; const sharedValue = useSharedValue(0); const buttonPressAnimationProps = useButtonPressAnimationProps(sharedValue); const { style, ...rest } = buttonPressAnimationProps; const getQuestImpressionId = useGetQuestImpressionId(); const callback = useCallback((a0) => { openAdGameLinkDirectly({ adContentId: bounty.id, adCreativeType: AdCreativeType.BOUNTY, cta: bounty.cta }, { content: a0, ctaContent: QuestContentCTA.OPEN_GAME_LINK, impressionId: getQuestImpressionId(), sourceQuestContent }); }, [bounty.id, bounty.cta, sourceQuestContent, getQuestImpressionId]); return { callback(QuestContent.VIDEO_MODAL_MOBILE); }, [callback])} accessibilityRole="button" accessibilityLabel={bountyCtaInfo.label} style={[styles.ctaPressable, style]}> {bountyCtaInfo.label} {bountyCtaInfo.subtext}