import { HsPanelComponent } from './panel-component.interface' ; import { HsPanelContainerServiceInterface } from './panel-container.service.interface' ; import { HsPanelItem } from './panel-item' ; import { Injectable , Type } from '@angular/core' ; import { ReplaySubject , Subject } from 'rxjs' ; @ Injectable ( { providedIn : 'root' , } ) export class HsPanelContainerService implements HsPanelContainerServiceInterface { panelObserver : ReplaySubject < HsPanelItem > = new ReplaySubject ( ) ; panelDestroyObserver : Subject < any > = new Subject ( ) ; constructor ( ) { } param component param data param panelObserver create ( component , data , panelObserver ? ) { ( panelObserver ?? this . panelObserver ) . next ( new HsPanelItem ( component , data ) ) ; } destroy ( component ) { this . panelDestroyObserver . next ( component ) ; } }