import { ThyGuiderRef } from './guider-ref' ; import { Injectable } from '@angular/core' ; @ Injectable ( { providedIn : 'root' } ) export class ThyGuiderManager { private targetListMap = { } ; private thyGuiderRef : ThyGuiderRef ; private activeStepKey : string ; constructor ( ) { } public updateActive ( key , guiderRef ) { this . activeStepKey = key ; this . thyGuiderRef = guiderRef ; } public addStepTarget ( key , el ) { this . targetListMap [ key ] = el ; } public removeStepTarget ( key ) { delete this . targetListMap [ key ] ; } public getActiveTarget ( key ) { return this . targetListMap [ key ] ; } public getActive ( ) { return { key : this . activeStepKey , guiderRef : this . thyGuiderRef } ; } }