//
//  ContentView.swift
//  JustOneThing
//
//  Created by Alan Francis on 02/06/2023.
//

import SwiftUI

struct ContentView: View {
    var body: some View {
        #if os(iOS) // iOS can add and remove
            ListOfThingsView()
        #elseif os(tvOS) || os(watchOS) ||  os(macOS) // macOS and tvOS and watchOS just show a readonly list
            SimpleListOfThingsView()
        #endif
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

#if os(iOS)
extension UIDevice {
    static var isIPad: Bool {
        UIDevice.current.userInterfaceIdiom == .pad
    }
    
    static var isIPhone: Bool {
        UIDevice.current.userInterfaceIdiom == .phone
    }
}
#endif
