@_private(sourceFile: "ContentView.swift") import OnCue
import func SwiftUI.__designTimeBoolean
import func SwiftUI.__designTimeInteger
import protocol SwiftUI.PreviewProvider
import func SwiftUI.__designTimeString
import func SwiftUI.__designTimeFloat
import struct SwiftUI.EmptyView
import protocol SwiftUI.View
import SwiftData
import SwiftUI

extension ContentView {
    @_dynamicReplacement(for: deleteItems(offsets:)) private func __preview__deleteItems(offsets: IndexSet) {
        #sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/ContentView.swift", line: 59)
        withAnimation {
            for index in offsets {
                modelContext.delete(items[index])
            }
        }
    
#sourceLocation()
    }
}

extension ContentView {
    @_dynamicReplacement(for: addItem()) private func __preview__addItem() {
        #sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/ContentView.swift", line: 52)
        withAnimation {
            let newProject = OCProject(name: __designTimeString("#3092.[2].[3].[0].arg[0].value.[0].value.arg[0].value", fallback: "Gaming!"))
            modelContext.insert(newProject)
        }
    
#sourceLocation()
    }
}

extension ContentView {
    @_dynamicReplacement(for: body) private var __preview__body: some View {
        #sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/ContentView.swift", line: 16)
        NavigationSplitView {
            List {
                ForEach(items) { item in
                    NavigationLink {
                        Text("\(item.cards)")
                    } label: {
                        VStack(alignment: .leading) {
                            Text("\(item.name)")
                                .font(.system(.title2, design: .default, weight: .medium))
                                .foregroundStyle(.blue)
                            Text("\(item.cards.count) Cards")
                        }
                    }
                    .padding(__designTimeInteger("#3092.[2].[2].property.[0].[0].arg[0].value.[0].arg[0].value.[0].arg[1].value.[0].modifier[0].arg[0].value", fallback: 12))
                }
                .onDelete(perform: deleteItems)
                
            }
            .toolbar {
                
                ToolbarItem(placement: .navigationBarTrailing) {
                    EditButton()
                }
                ToolbarItem {
                    Button(action: addItem) {
                        Label(__designTimeString("#3092.[2].[2].property.[0].[0].arg[0].value.[0].modifier[0].arg[0].value.[1].arg[0].value.[0].arg[1].value.[0].arg[0].value", fallback: "Add Item"), systemImage: __designTimeString("#3092.[2].[2].property.[0].[0].arg[0].value.[0].modifier[0].arg[0].value.[1].arg[0].value.[0].arg[1].value.[0].arg[1].value", fallback: "plus"))
                    }
                }
            }
            .navigationTitle(__designTimeString("#3092.[2].[2].property.[0].[0].arg[0].value.[0].modifier[1].arg[0].value", fallback: "Projects"))
        } detail: {
            Text(__designTimeString("#3092.[2].[2].property.[0].[0].arg[1].value.[0].arg[0].value", fallback: "Select an item"))
        }
    
#sourceLocation()
    }
}

import struct OnCue.ContentView
#Preview {
    
//    let config = ModelConfiguration(isStoredInMemoryOnly: true)
//        let container = try! ModelContainer(for: User.self, configurations: config)
//
//        let user = User(name: "Test User")
//        return EditingView(user: user)
//            .modelContainer(container)
    
    let config = ModelConfiguration(isStoredInMemoryOnly: true)
    let container = try! ModelContainer(for: OCProject.self, configurations: config)
    
    let p = OCProject(name: "test project")
    container.mainContext.insert(p)
    
    return ContentView()
            .modelContainer(container)
}



