import { Component } from '@angular/core' ; import { BehaviorSubject , Observable } from 'rxjs' ; import { map } from 'rxjs/operators' ; import { MindsUser } from '../../../../interfaces/entities' ; import { Session } from '../../../../services/session' ; import { BoostableEntity , BoostModalService , BoostSubject , BoostTab , } from '../boost-modal.service' ; /**
 * Offer and newsfeed tabs for boost modal.
 */ @ Component ( { selector : 'm-boostModal__tabs' , templateUrl : './boost-modal-tabs.component.html' , styleUrls : [ './boost-modal-tabs.component.ng.scss' ] , } ) export class BoostModalTabsComponent { constructor ( private service , private session ) { } returns { Observable < boolean > } get showTabs$ ( ) : Observable < boolean > { return this . service . entityType$ . pipe ( map ( subject => subject === 'post' ) ) ; } returns { BehaviorSubject < BoostTab > } get activeTab$ ( ) : BehaviorSubject < BoostTab > { return this . service . activeTab$ ; } returns { Observable < BoostSubject > } get entityType$ ( ) : Observable < BoostSubject > { return this . service . entityType$ ; } get entity$ ( ) : BehaviorSubject < BoostableEntity > { return this . service . entity$ ; } param { BoostTab } returns { void } public nextTab ( tab ) { this . activeTab$ . next ( tab ) ; } returns { MindsUser } public getLoggedInUser ( ) { return this . session . getLoggedInUser ( ) ; } }