import SwiftUI

@main
struct HTPortalVPNApp: App {
    @StateObject private var model = MainViewModel()

    var body: some Scene {
        WindowGroup {
            MainView(model: model)
                .onOpenURL { model.handle(url: $0) }
                .onContinueUserActivity(NSUserActivityTypeBrowsingWeb) { activity in
                    guard let url = activity.webpageURL else { return }
                    model.handle(url: url)
                }
                .tint(Color(red: 0.075, green: 0.486, blue: 0.757))
        }
    }
}
