import { Component , EventEmitter , Input , Output } from '@angular/core' ; import { CmdbType } from '../../../models/cmdb-type' ; import { SupportedExporterExtension } from '../../../../export/export-objects/model/supported-exporter-extension' ; import { RenderResult } from '../../../models/cmdb-render' ; import { Router } from '@angular/router' ; @ Component ( { selector : 'cmdb-object-table-head' , templateUrl : './object-table-head.component.html' , styleUrls : [ './object-table-head.component.scss' ] } ) export class ObjectTableHeadComponent { @ Input ( ) public selectedObjects : Array < RenderResult > = [ ] ; @ Input ( ) public selectedObjectsIDs : Array < number > = [ ] ; @ Input ( ) public formatList : SupportedExporterExtension [ ] = [ ] ; @ Input ( ) public totalResults : number = 0 ; @ Output ( ) public fileExport : EventEmitter < any > = new EventEmitter < any > ( ) ; @ Output ( ) public manyObjectDeletes : EventEmitter < any > = new EventEmitter < any > ( ) ; @ Input ( ) public type : CmdbType ; public constructor ( private router ) { } public onBulkChange ( ) { this . router . navigate ( [ '/framework/object/change/' ] , { state : { type : this . type , objects : this . selectedObjects } } ) ; } public exporter ( see , view = 'native' ) { see . view = view ; this . fileExport . emit ( see ) ; } }