import AppKit
import SwiftUI

@main
struct CalcPadApp: App {
    init() {
        // Without a .app bundle, macOS treats the process as a background app
        // that cannot receive keyboard input. This makes it a regular foreground app.
        NSApplication.shared.setActivationPolicy(.regular)
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
                .onAppear {
                    NSApplication.shared.activate(ignoringOtherApps: true)
                }
        }
        .defaultSize(width: 800, height: 600)
    }
}
