import SwiftUI

struct ContentView: View {
    @State private var isLoading = true

    var body: some View {
        ZStack(alignment: .top) {
            WebPortalView(url: AppSettings.portalURL, isLoading: $isLoading)
                .ignoresSafeArea(.container, edges: .bottom)

            if isLoading {
                ProgressView()
                    .controlSize(.large)
                    .padding(18)
                    .background(.regularMaterial)
                    .clipShape(RoundedRectangle(cornerRadius: 14, style: .continuous))
                    .padding(.top, 18)
            }
        }
    }
}

#Preview {
    ContentView()
}
