import SwiftUI
import SwiftData
#if canImport(GoogleMobileAds)
import GoogleMobileAds
#endif

@main
struct MealMoodApp: App {
    private let modelContainer: ModelContainer = {
        let schema = Schema([
            AppSettings.self,
            Tag.self,
            Dish.self,
            WeekPlan.self,
            MealSlot.self
        ])
        let configuration = ModelConfiguration(cloudKitDatabase: .none)
        return try! ModelContainer(for: schema, configurations: [configuration])
    }()

    init() {
#if canImport(GoogleMobileAds)
        GADMobileAds.sharedInstance().start(completionHandler: nil)
#endif
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
        .modelContainer(modelContainer)
    }
}
