import AppKit
import SwiftUI

func makeWidgetsPageHost(canAddWidgets: Bool, onAddBlocked: @escaping () -> Void) -> NSView {
    let host = NSHostingView(
        rootView: WidgetsRootView(
            canAddWidgets: canAddWidgets,
            onAddBlocked: onAddBlocked
        )
    )
    host.translatesAutoresizingMaskIntoConstraints = false
    return host
}
