//
//  ContentView.swift
//  Workouts Watch App
//
//  Copyright 2025 Rouslan Zenetl. All Rights Reserved.
//

import SwiftUI

struct ContentView: View {
    @Environment(WatchConnectivityBridge.self) private var bridge

    var body: some View {
        ActiveWorkoutGateView()
            // The iPhone started driving a run we're not already in — follow it live here.
            .fullScreenCover(isPresented: Binding(
                get: { bridge.presentable != nil },
                set: { presenting in if !presenting { bridge.muteLive() } }
            )) {
                if let frame = bridge.presentable {
                    LiveRunCoverView(frame: frame) { bridge.muteLive() }
                }
            }
    }
}
