summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadVPN/View controllers/Settings/SettingsViewModel.swift
blob: 44ec88ed4932597bb646ec2a3ed33523a867ade8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//
//  SettingsViewModel.swift
//  MullvadVPN
//
//  Created by Jon Petersson on 2024-10-03.
//  Copyright © 2025 Mullvad VPN AB. All rights reserved.
//

import MullvadSettings

struct SettingsViewModel {
    private(set) var daitaSettings: DAITASettings
    private(set) var multihopState: MultihopState

    var currentLanguage: String {
        let currentLanguage = ApplicationLanguage.currentLanguage
        return "\(currentLanguage.flagEmoji) \(currentLanguage.displayName)"
    }

    init(from tunnelSettings: LatestTunnelSettings = LatestTunnelSettings()) {
        daitaSettings = tunnelSettings.daita
        multihopState = tunnelSettings.tunnelMultihopState
    }
}