struct ContentView: View {
   @State private var path = NavigationPath()
   @State private var picture: UIImage?

   var body: some View {
      NavigationStack(path: $path) {
         VStack {
            HStack {
               Spacer()
               NavigationLink(value: "Open Picker", label: {
                  Text("Get Picture")
               })
               .buttonStyle(.glassProminent)
               .padding()
               .navigationDestination(for: String.self) { _ in
                  ImagePicker { newpicture in
                     picture = newpicture
                     path.removeLast()
                  }
                  .ignoresSafeArea()
               }
            }
            Image(uiImage: picture ?? UIImage(named: "nopicture")!)
               .resizable()
               .scaledToFit()
            Spacer()
         }.padding()
      }.statusBarHidden()
   }
}