package ru.forbion.f7cloud.feature.talk

enum class TalkRoomFilter(val label: String) {
    ALL("Все"),
    UNREAD("Непрочитанные"),
    FAVORITES("Избранное"),
    MENTIONS("Упоминания"),
}

fun TalkRoom.matchesFilter(filter: TalkRoomFilter): Boolean = when (filter) {
    TalkRoomFilter.ALL -> true
    TalkRoomFilter.UNREAD -> hasUnread
    TalkRoomFilter.FAVORITES -> isFavorite
    TalkRoomFilter.MENTIONS -> unreadMention
}
