import SwiftUI



@main
struct TempTrackApp: App {

    @StateObject
    private var storage: PersistentStorage

    @StateObject
    private var scanner: BluetoothScanner

    @StateObject
    private var transfer = TransferHandler()

    init() {
        let storage = PersistentStorage()
        self._scanner = .init(wrappedValue: .init(storage: storage))
        self._storage = .init(wrappedValue: storage)
    }

    var body: some Scene {
        WindowGroup {
            ContentView(scanner: scanner)
                .environmentObject(storage)
                .environmentObject(transfer)
        }
    }
}
