import SwiftUI struct HUDView: View { let volume: Float let isMuted: Bool private let totalBars = 16 private let cornerRadius: CGFloat = 18 var filledBars: Int { if isMuted { return 0 } return Int(round(Double(volume) * Double(totalBars))) } var speakerIcon: String { if isMuted { return "speaker.slash.fill" } if volume == 0 { return "speaker.fill" } if volume < 0.33 { return "speaker.wave.1.fill" } if volume < 0.66 { return "speaker.wave.2.fill" } return "speaker.wave.3.fill" } var body: some View { VStack(spacing: 16) { Image(systemName: speakerIcon) .font(.system(size: 48, weight: .medium)) .foregroundColor(.white) .frame(height: 60) HStack(spacing: 4) { ForEach(0..