import { Store } from '@ngrx/store' ; import { ModalDialogParams } from "nativescript-angular" ; import { LogService , BaseComponent } from '../../shared/core/index' ; import { PlaylistService , IPlaylistState , PlaylistModel , PLAYER_ACTIONS , FIREBASE_ACTIONS , FirebaseService } from '../../shared/shoutoutplay/index' ; @ BaseComponent ( { selector : 'playlist-chooser' , templateUrl : './components/playlist/playlist-chooser.component.html' } ) export class PlaylistChooserComponent { constructor ( private store , private logger , public playlistService , private firebaseService , private params ) { } public close ( ) { this . params . closeCallback ( ) ; } public choose ( e ) { this . store . take ( 1 ) . subscribe ( ( s ) => { this . playlistService . addTrackTo ( s . firebase . playlists [ e . index ] . id ) ; this . close ( ) ; } ) ; } }