//
//  Subtasks.swift
//  Subtasks
//

import Adwaita

@main
struct Subtasks: App {

    @State private var tasks: [Task] = [
        .init(label: "Hello"),
        .init(label: "World"),
        .init(label: "Complete", done: true)
    ]
    let app: AdwaitaApp = .init(id: "io.github.david_swift.Subtasks")

    var scene: Scene {
        Window(id: "main") { window in
            TaskList(tasks: $tasks)
                .topToolbar {
                    ToolbarView(app: app, window: window)
                }
        }
        .defaultSize(width: 450, height: 300)
    }

}
