import { Component , Input , OnDestroy , OnInit } from '@angular/core' ; import { CmdbType } from '../../../framework/models/cmdb-type' ; import { Subscription } from 'rxjs' ; import { ObjectService } from '../../../framework/services/object.service' ; import { SidebarService } from '../../services/sidebar.service' ; @ Component ( { selector : 'cmdb-sidebar-type' , templateUrl : './sidebar-type.component.html' , styleUrls : [ './sidebar-type.component.scss' ] } ) export class SidebarTypeComponent implements OnInit , OnDestroy { @ Input ( ) public type : CmdbType ; public objectCounter : unknown = 0 ; public constructor ( private objectService , private sidebarService ) { } public ngOnInit ( ) { this . sidebarService . initializeCounter ( this ) ; } public ngOnDestroy ( ) { this . sidebarService . deleteCounter ( this ) ; } }