import { Injectable } from '@angular/core' ; import { ApplicationSettings , UserConfiguration } from 'uhk-common' ; import { Observable , of } from 'rxjs' ; @ Injectable ( ) export class DataStorageRepositoryService { getConfig ( ) { return of ( JSON . parse ( localStorage . getItem ( 'config' ) ) ) ; } saveConfig ( config ) { localStorage . setItem ( 'config' , JSON . stringify ( config . toJsonObject ( ) ) ) ; return of ( null ) ; } getApplicationSettings ( ) { return of ( JSON . parse ( localStorage . getItem ( 'application-settings' ) ) ) ; } saveApplicationSettings ( settings ) { localStorage . setItem ( 'application-settings' , JSON . stringify ( settings ) ) ; return of ( null ) ; } }