<commit_before>import UIKit

/// Provides image, font, and color styles based on theme and notification type
struct NotificationsCenterCellStyle {

    // MARK: - Properties

    let theme: Theme
    let traitCollection: UITraitCollection
    let notificationType: RemoteNotificationType

    // MARK: - Colors

    var cellSeparatorColor: UIColor {
        return theme.colors.tertiaryText.withAlphaComponent(0.5)
    }

    func headerTextColor(_ displayState: NotificationsCenterCellDisplayState) -> UIColor {
        guard displayState.isUnread else {
            return theme.colors.secondaryText
        }

        switch notificationType {
        case .welcome, .editMilestone, .translationMilestone(_), .failedMention:
            return theme.colors.primaryText
        case .loginFailKnownDevice, .loginFailUnknownDevice, .loginSuccessUnknownDevice:
            return theme.colors.error
        default:
            return theme.colors.link
        }
    }

    func subheaderTextColor(_ displayState: NotificationsCenterCellDisplayState) -> UIColor {
        switch notificationType {
        default:
            return displayState.isUnread ? theme.colors.primaryText : theme.colors.secondaryText
        }
    }

    var messageTextColor: UIColor {
        return theme.colors.secondaryText
    }

    var metadataTextColor: UIColor {
        return theme.colors.secondaryText
    }

    var relativeTimeAgoColor: UIColor {
        return theme.colors.secondaryText
    }

    var projectSourceColor: UIColor {
        return theme.colors.secondaryText
    }

    func leadingImageBackgroundColor(_ displayState: NotificationsCenterCellDisplayState) -> UIColor {
        if displayState.isSelectionDisplay {
            let color = displayState.isSelected ? theme.colors.link : .clear
            return color
        } else if displayState == .defaultRead {
            return theme.colors.secondaryText
        }

        switch notificationType {
        case .editMilestone, .translationMilestone(_), .welcome, .thanks:
            return theme.colors.accent
        case .loginFailKnownDevice, .loginFailUnknownDevice, .loginSuccessUnknownDevice:
            return theme.colors.error
        case .failedMention, .editReverted, .userRightsChange:
            return theme.colors.warning
        default:
            return theme.colors.link
        }
    }

    func leadingImageBorderColor(_ displayState: NotificationsCenterCellDisplayState) -> UIColor {
        if displayState.isSelectionDisplay {
            let color = displayState.isSelected ? theme.colors.link : theme.colors.secondaryText
            return color
        }

        return leadingImageBackgroundColor(displayState)
    }

    var leadingImageTintColor: UIColor {
        return theme.colors.paperBackground
    }

    var selectedCellBackgroundColor: UIColor {
        return theme.colors.batchSelectionBackground
    }

    // MARK: - Fonts

    func headerFont(_ displayState: NotificationsCenterCellDisplayState) -> UIFont {
        if displayState.isRead {
            return UIFont.wmf_font(.body, compatibleWithTraitCollection: traitCollection)
        }

        return UIFont.wmf_font(.headline, compatibleWithTraitCollection: traitCollection)
    }

    func subheaderFont(_ displayState: NotificationsCenterCellDisplayState) -> UIFont {
        if displayState.isRead {
            return UIFont.wmf_font(.subheadline, compatibleWithTraitCollection: traitCollection)
        }<commit_msg>Update default header font weight for unread notifications to bold.<commit_after>import UIKit

/// Provides image, font, and color styles based on theme and notification type
struct NotificationsCenterCellStyle {

    // MARK: - Properties

    let theme: Theme
    let traitCollection: UITraitCollection
    let notificationType: RemoteNotificationType

    // MARK: - Colors

    var cellSeparatorColor: UIColor {
        return theme.colors.tertiaryText.withAlphaComponent(0.5)
    }

    func headerTextColor(_ displayState: NotificationsCenterCellDisplayState) -> UIColor {
        guard displayState.isUnread else {
            return theme.colors.secondaryText
        }

        switch notificationType {
        case .welcome, .editMilestone, .translationMilestone(_), .failedMention:
            return theme.colors.primaryText
        case .loginFailKnownDevice, .loginFailUnknownDevice, .loginSuccessUnknownDevice:
            return theme.colors.error
        default:
            return theme.colors.link
        }
    }

    func subheaderTextColor(_ displayState: NotificationsCenterCellDisplayState) -> UIColor {
        switch notificationType {
        default:
            return displayState.isUnread ? theme.colors.primaryText : theme.colors.secondaryText
        }
    }

    var messageTextColor: UIColor {
        return theme.colors.secondaryText
    }

    var metadataTextColor: UIColor {
        return theme.colors.secondaryText
    }

    var relativeTimeAgoColor: UIColor {
        return theme.colors.secondaryText
    }

    var projectSourceColor: UIColor {
        return theme.colors.secondaryText
    }

    func leadingImageBackgroundColor(_ displayState: NotificationsCenterCellDisplayState) -> UIColor {
        if displayState.isSelectionDisplay {
            let color = displayState.isSelected ? theme.colors.link : .clear
            return color
        } else if displayState == .defaultRead {
            return theme.colors.secondaryText
        }

        switch notificationType {
        case .editMilestone, .translationMilestone(_), .welcome, .thanks:
            return theme.colors.accent
        case .loginFailKnownDevice, .loginFailUnknownDevice, .loginSuccessUnknownDevice:
            return theme.colors.error
        case .failedMention, .editReverted, .userRightsChange:
            return theme.colors.warning
        default:
            return theme.colors.link
        }
    }

    func leadingImageBorderColor(_ displayState: NotificationsCenterCellDisplayState) -> UIColor {
        if displayState.isSelectionDisplay {
            let color = displayState.isSelected ? theme.colors.link : theme.colors.secondaryText
            return color
        }

        return leadingImageBackgroundColor(displayState)
    }

    var leadingImageTintColor: UIColor {
        return theme.colors.paperBackground
    }

    var selectedCellBackgroundColor: UIColor {
        return theme.colors.batchSelectionBackground
    }

    // MARK: - Fonts

    func headerFont(_ displayState: NotificationsCenterCellDisplayState) -> UIFont {
        if displayState.isRead {
            return UIFont.wmf_font(.body, compatibleWithTraitCollection: traitCollection)
        }

        return UIFont.wmf_font(.boldHeadline, compatibleWithTraitCollection: traitCollection)
    }

    func subheaderFont(_ displayState: NotificationsCenterCellDisplayState) -> UIFont {
        if displayState.isRead {
            return UIFont.wmf_font(.subheadline, compatibleWithTraitCollection: traitCollection)
        }
{'fraction_non_alphanumeric': 0.065655133295519, 'fraction_numerical': 0.0005672149744753262, 'mean_word_length': 2.6449612403100775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1078953', 'n_tokens_mistral': 1781, 'n_tokens_neox': 1740, 'n_words': 393}