import Foundation

struct PeerUser: Identifiable, Hashable {
    let id: String // Use nodeID as the primary stable ID
    let nodeID: String
    let name: String
    let colorHex: String
    let role: UserRole
    var isStable: Bool = false // New: visual indicator for traffic gate status
    
    init(nodeID: String, name: String, colorHex: String = "#808080", role: UserRole = .hearing, isStable: Bool = false) {
        self.id = nodeID
        self.nodeID = nodeID
        self.name = name
        self.colorHex = colorHex
        self.role = role
        self.isStable = isStable
    }
}