/** Angular Imports */ import { Injectable } from '@angular/core' ; /** Environment Imports */ import { environment } from '../../environments/environment' ; /**
 * Settings Service
 */ @ Injectable ( { providedIn : 'root' } ) export class SettingsService { constructor ( ) { } param { string } dateFormat setDateFormat ( dateFormat ) { localStorage . setItem ( 'mifosXDateFormat' , JSON . stringify ( dateFormat ) ) ; } param { any } language setLanguage ( language ) { localStorage . setItem ( 'mifosXLanguage' , JSON . stringify ( language ) ) ; } param { string } url setServer ( url ) { localStorage . setItem ( 'mifosXServerURL' , JSON . stringify ( url ) ) ; } param { string [ ] } list setServers ( list ) { localStorage . setItem ( 'mifosXServers' , JSON . stringify ( list ) ) ; } /**
     * Returns date format setting.
     */ get dateFormat ( ) { return JSON . parse ( localStorage . getItem ( 'mifosXDateFormat' ) ) ; } /**
     * Returns language setting
     */ get language ( ) { return JSON . parse ( localStorage . getItem ( 'mifosXLanguage' ) ) ; } /**
     * Returns list of default server
     */ get servers ( ) { return JSON . parse ( localStorage . getItem ( 'mifosXServers' ) ) ; } /**
     * Returns server setting
     */ get server ( ) { return environment . baseApiUrl ; } }