@_private(sourceFile: "NewProjectForm.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 SwiftUI

extension ColorChooserCircle {
    @_dynamicReplacement(for: body) private var __preview__body: some View {
        #sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/NewProjectForm.swift", line: 59)
        Circle()
            .strokeBorder(Color.gray,lineWidth: __designTimeInteger("#22127.[2].[1].property.[0].[0].modifier[0].arg[1].value", fallback: 2))
            .background(Circle().foregroundColor(color))
            .frame(minHeight: __designTimeInteger("#22127.[2].[1].property.[0].[0].modifier[2].arg[0].value", fallback: 25))
    
#sourceLocation()
    }
}

extension NewProjectForm {
    @_dynamicReplacement(for: body) private var __preview__body: some View {
        #sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/NewProjectForm.swift", line: 21)
        NavigationView {
            Form {
                TextField(__designTimeString("#22127.[1].[5].property.[0].[0].arg[0].value.[0].arg[0].value.[0].arg[0].value", fallback: "Project Name"), text: $newProjectName)
                Section(header: Text(__designTimeString("#22127.[1].[5].property.[0].[0].arg[0].value.[0].arg[0].value.[1].arg[0].value.arg[0].value", fallback: "Project Colour"))) {
                    HStack {
                        ForEach(colors, id: \.self) { clr in
                            ColorChooserCircle(color: clr)
                                .padding(.vertical)
                                .onTapGesture {
                                    self.chosenColor = clr
                                    print(clr.toHex()!)
                                }
                        }
                    }
                }
            }
            .navigationTitle(__designTimeString("#22127.[1].[5].property.[0].[0].arg[0].value.[0].modifier[0].arg[0].value", fallback: "Add New Project")).foregroundStyle(chosenColor)
            .navigationBarTitleDisplayMode(.inline)
            .toolbar {
                ToolbarItem(placement: .topBarLeading) {
                    Button(__designTimeString("#22127.[1].[5].property.[0].[0].arg[0].value.[0].modifier[3].arg[0].value.[0].arg[1].value.[0].arg[0].value", fallback: "Cancel"), role: .cancel) { dismiss() }
                        .foregroundStyle(.red)
                }
                ToolbarItem(placement: .topBarTrailing) {
                    Button(__designTimeString("#22127.[1].[5].property.[0].[0].arg[0].value.[0].modifier[3].arg[0].value.[1].arg[1].value.[0].arg[0].value", fallback: "Done")) {
                        completionHandler(newProjectName, chosenColor.toHex() ?? __designTimeString("#22127.[1].[5].property.[0].[0].arg[0].value.[0].modifier[3].arg[0].value.[1].arg[1].value.[0].arg[1].value.[0].arg[1].value.[0]", fallback: "FF0000"))
                        dismiss()
                    }
                }
            }
        }
    
#sourceLocation()
    }
}

import struct OnCue.NewProjectForm
import struct OnCue.ColorChooserCircle
#Preview {
    NewProjectForm { name, color in }
}



