// Metro module 15626 (f15627). import CollectiblesMarketingsStore from "../CollectiblesMarketingsStore"; import { ContentDismissActionType } from "../../dismissible_content/DismissibleContentConstants"; import { useSelectedVersionedDismissibleContent } from "../../dismissible_content/hooks/useSelectedDismissibleContent"; import { DismissibleContent } from "../../../_bundle/Module1358"; import YouScreenNavIcon from "../../main_tabs_v2/native/tabs/you/YouScreenNavIcon"; import { ShopIcon } from "../../../design/components/Icon/native/redesign/generated/ShopIcon"; import { intl, t } from "../../../intl/index.native"; import MobileShopButtonCoachmark from "./MobileShopButtonCoachmark"; import { useStateFromStores } from "../../../_bundle/defaultAreStatesEqual"; import { CollectiblesMarketingSurface } from "../../../_bundle/Module13124"; import { CollectiblesMarketingType } from "../../../_bundle/Module5822"; import SelectedDismissibleContent, { SelectedVersionedDismissibleContent } from "../../dismissible_content/native/SelectedDismissibleContent"; const CoachmarkVariant = function CoachmarkVariant(props) { const { marketing, navigateToShop, shopButtonRef: shopButtonRef2 } = props; const [r31, onDismiss] = useSelectedVersionedDismissibleContent(DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING, marketing.version, void 0, true); let c22254_1 = onDismiss; const showRedDot = r31 === DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING; let c22254_2 = showRedDot; return <> { if (c22254_2) { c22254_1(ContentDismissActionType.TAKE_ACTION); } navigateToShop(); }} showRedDot={showRedDot} /> ; }; export default function CollectiblesShopEntryButton(props) { let r48; const { navigateToShop: navigateToShop2, shopButtonRef } = props; const stateFromStores = useStateFromStores([CollectiblesMarketingsStore], () => CollectiblesMarketingsStore.getMarketingBySurface(CollectiblesMarketingSurface.MOBILE_SHOP_BUTTON)); const r1 = stateFromStores != null && "dismissibleContent" in stateFromStores && stateFromStores.dismissibleContent === DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING; if (stateFromStores?.type === CollectiblesMarketingType.COACHMARK) { return ; } const content = function content({ visibleContent, markAsDismissed }) { return { navigateToShop2(); if (visibleContent != null) { markAsDismissed(ContentDismissActionType.PRIMARY); } }} showRedDot={visibleContent != null} />; }; if (r1) { const contentType = stateFromStores?.type === CollectiblesMarketingType.BADGE ? DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING : null; let latestVersion = stateFromStores?.version; if (latestVersion == null) { latestVersion = 0; } r48 = {content}; } else { r48 = {content}; } return r48; };