SwiftUI navigate to another view from a popup

when I click on a mapview pin, a PopupView comes up with some text and a button. I want to be able to navigate to another DetailsView by clicking on the button display in the popup, the button is embedded inside NavigationLink. But clicking on the button nothing happens. How to navigate from button click?

struct MyMapView: View {
    
    @State var position: MapCameraPosition = .automatic
    @State var showCallout: Bool = false
    @State var selected: PinAnnotation?
    @Binding var locationPins: [PinAnnotation]
    @State private var toggler = false
    
    var body: some View {
        Map(position: $position) {
            
            ForEach(locationPins, id: \.self) { result in
                Annotation(result.title!, coordinate: result.coordinate) {
                    ZStack {
                        Image(systemName: "mappin.circle.fill")
                            .resizable()
                            .scaledToFit()
                            .frame(width: 30, height: 30)
                            .onTapGesture {
                                selected = result
                                toggler.toggle()
                            }
                            .foregroundStyle(.white, .purple)
                        
                        if selected == result && toggler {
                            PopupView(pin: selected)
                        } else {
                            EmptyView()
                        }
                    }
                }
            }
            
        }
    }
    
    
    struct PopupView: View {
        @State var pin: PinAnnotation?
        @State private var select: Int? = 0
        
        var body: some View {
             
                VStack (alignment: .leading) {
                    HStack {
                        
                        if let val = pin {
                            

                            Text(val.text)
                                .font(.system(size: 12, weight: .light, design: .default))

                            NavigationLink(destination: DetailsView(), label: {
                                Button(action: {select = 1}){
                                    Image(systemName: "play.circle")
                                }
                               .scaledToFit()
                               .frame(width: 50, height: 50)
                               .background(Color.blue)
                               .foregroundColor(.white)
                               .clipShape(Circle())

                            })
                            
                            
                            
                        } else {
                            Text("no data")
                        }
                    }
                    // .fixedSize()
                }
                .scaledToFit()
                .foregroundStyle(.purple)
                .frame(maxWidth: .infinity)
                .background(Color.white)
                .cornerRadius(10)
                .shadow(radius: 5)
                .offset(x: 0, y: -45)
            }
            
    
    }
    
    struct DetailsView: View {
        @Environment(\.presentationMode) var presentation

        var body: some View {
            Group {
                Button("Back") {
                    self.presentation.wrappedValue.dismiss()
                }
            }
        }
    }
}

Change @State var pin in PinView to a @Binding var pin

@State var pin: PinAnnotation?

The expression selected = 1 does nothing.

 Button(action: {select = 1})

Changed the pin from state to Binding, did not work either

The problem is that the button is dead it is not accepting the tap. I put in debug break in isSelected = true statement. When I tap the button it never hits the breakpoint, it is as if the navigationlink button is inactive. How to make it active.

 NavigationLink(destination: DetailsView(), label: {
                                    Button(action: {
                                        isSelected = true
                                    }){
                                        Image(systemName: "play.circle")
                                    }
                                    
                                    .scaledToFit()
                                    .frame(width: 50, height: 50)
                                    .background(Color.blue)
                                    .foregroundColor(.white)
                                    .clipShape(Circle())
                                    
                                })

SwiftUI navigate to another view from a popup
 
 
Q