import { Component , ViewRef } from '@angular/core' ; import { HsCompositionsService } from '../compositions.service' ; import { HsDialogComponent } from '../../layout/dialogs/dialog-component.interface' ; import { HsDialogContainerService } from '../../layout/dialogs/dialog-container.service' ; import { HsSaveMapManagerService } from '../../save-map/save-map-manager.service' ; @ Component ( { selector : 'hs-compositions-overwrite-dialog' , templateUrl : './dialog_overwriteconfirm.html' , } ) export class HsCompositionsOverwriteDialogComponent implements HsDialogComponent { viewRef : ViewRef ; data : any ; constructor ( public HsDialogContainerService , public HsCompositionsService , public HsSaveMapManagerService ) { } close ( ) { this . HsDialogContainerService . destroy ( this ) ; } public description overwrite ( ) { this . HsCompositionsService . loadComposition ( this . HsCompositionsService . compositionToLoad . url , true ) ; this . close ( ) ; } public description save ( ) { this . HsSaveMapManagerService . openPanel ( null ) ; this . close ( ) ; } public description add ( ) { this . HsCompositionsService . loadComposition ( this . HsCompositionsService . compositionToLoad . url , false ) ; this . close ( ) ; } }