import type { GlobalState } from '../types'; export function selectNotifySettings(global: T) { return global.settings.byKey; } export function selectNotifyExceptions(global: T) { return global.settings.notifyExceptions; } export function selectLanguageCode(global: T) { return global.settings.byKey.language.replace('-raw', ''); } export function selectCanSetPasscode(global: T) { return global.authRememberMe && global.isCacheApiSupported; } export function selectTranslationLanguage(global: T) { return global.settings.byKey.translationLanguage || selectLanguageCode(global); } export function selectNewNoncontactPeersRequirePremium(global: T) { return global.settings.byKey.shouldNewNonContactPeersRequirePremium; } export function selectShouldHideReadMarks(global: T) { return global.settings.byKey.shouldHideReadMarks; }