import { AutoArchiveSettings } from '@ulangi/ulangi-common/interfaces' ; import { ObservableUserStore } from '@ulangi/ulangi-observable' ; import { config } from '../../constants/config' ; export class AutoArchiveSettingsDelegate { private userStore : ObservableUserStore ; public constructor ( userStore ) { this . userStore = userStore ; } public getCurrentSettings ( ) { const autoArchiveSettings = typeof this . userStore . existingCurrentUser . globalAutoArchive !== 'undefined' ? this . userStore . existingCurrentUser . globalAutoArchive : config . user . defaultGlobalAutoArchive ; return autoArchiveSettings ; } }