import { ChangeDetectionStrategy , ChangeDetectorRef , Component , ElementRef , ViewChild , } from '@angular/core' ; import { Router } from '@angular/router' ; import { ConfigsService } from '../../../../common/services/configs.service' ; import { BlockchainMarketingLinksService } from './blockchain-marketing-links.service' ; /**
 * Multi-page rewards marketing component
 */ @ Component ( { selector : 'm-blockchainMarketing__rewards--v2' , templateUrl : 'rewards.component.html' , changeDetection : ChangeDetectionStrategy . OnPush , styleUrls : [ './rewards.component.ng.scss' ] , } ) export class BlockchainMarketingRewardsV2Component { readonly cdnAssetsUrl : string ; readonly contributionValues : { [ key ] : number ; } ; @ ViewChild ( 'topAnchor' ) readonly topAnchor : ElementRef ; constructor ( protected router , protected cd , private linksService , configs ) { this . cdnAssetsUrl = configs . get ( 'cdn_assets_url' ) ; this . contributionValues = configs . get ( 'contribution_values' ) ; } scrollToTop ( ) { if ( this . topAnchor . nativeElement ) { this . topAnchor . nativeElement . scrollIntoView ( { behavior : 'smooth' , block : 'start' , inline : 'nearest' , } ) ; } } action ( ) { this . router . navigate ( [ '/wallet/tokens/overview' ] ) ; } returns { void } public openComposerModal ( ) { this . linksService . openComposerModal ( ) ; } returns { void } public navigateToReferrals ( ) { this . linksService . navigateToReferrals ( ) ; } returns { void } public navigateToWhitepaper ( ) { this . linksService . navigateToWhitepaper ( ) ; } returns { void } public navigateToBlog ( ) { this . linksService . navigateToBlog ( ) ; } returns { void } public joinRewardsClick ( ) { this . linksService . navigateToJoinRewards ( ) ; } returns { void } public buyTokensClick ( ) { this . linksService . openBuyTokensModal ( ) ; } returns { void } public provideLiquidityClick ( ) { this . linksService . openLiquidityProvisionModal ( ) ; } returns { void } public transferOnChainClick ( ) { this . linksService . openTransferOnchainModal ( ) ; } returns { void } public onPurchaseComplete ( $event ) { } public detectChanges ( ) { this . cd . markForCheck ( ) ; this . cd . detectChanges ( ) ; } }