5cb41c35e708fd46bd44cbed1aa8166e6a464138
[ccsdk/cds.git] /
1 import {Component, EventEmitter, OnInit, Output} from '@angular/core';
2 import {PackageCreationStore} from '../../package-creation.store';
3 import {Template} from '../../mapping-models/CBAPacakge.model';
4
5 @Component({
6     selector: 'app-templ-mapp-listing',
7     templateUrl: './templ-mapp-listing.component.html',
8     styleUrls: ['./templ-mapp-listing.component.css']
9 })
10 export class TemplMappListingComponent implements OnInit {
11     @Output() showCreationViewParentNotification = new EventEmitter<any>();
12     private templates: Template;
13
14     constructor(private packageCreationStore: PackageCreationStore) {
15         this.packageCreationStore.state$.subscribe(cba => {
16             if (cba.templates) {
17                 this.templates = cba.templates;
18             }
19         });
20     }
21
22     ngOnInit() {
23     }
24
25     openCreationView() {
26         this.showCreationViewParentNotification.emit('tell parent to open create views');
27     }
28
29 }