// The Swift Programming Language
// https://docs.swift.org/swift-book

import Adwaita

@main
struct AdwaitaTemplate: App {

    let app = AdwaitaApp(id: "io.github.AparokshaUI.AdwaitaTemplate")

    var scene: Scene {
        Window(id: "main") { window in
            Content(app: app, window: window)
        }
        .defaultSize(width: 450, height: 300)
    }

}

struct Content: View {

    var app: AdwaitaApp
    var window: AdwaitaWindow

    var view: Body {
        Button(Loc.helloWorld) {
            print(Loc.helloWorld)
        }
        .padding()
        .valign(.center)
        .halign(.center)
        .topToolbar {
            ToolbarView(app: app, window: window)
        }
    }

}
