import Foundation import ActivityKit /// Live Activity attributes for a running Gassi-Tour. Lives in `Shared/` and /// is compiled into both the app target (which starts/updates/ends activities) /// and the widget extension (which renders the lock screen + Dynamic Island). struct WalkActivityAttributes: ActivityAttributes { public typealias ContentState = WalkActivityState public struct WalkActivityState: Codable, Hashable { public var distanceMeters: Double public var elapsedSeconds: Int public var pointCount: Int public var isPaused: Bool public var isAutoPaused: Bool public init( distanceMeters: Double, elapsedSeconds: Int, pointCount: Int, isPaused: Bool, isAutoPaused: Bool ) { self.distanceMeters = distanceMeters self.elapsedSeconds = elapsedSeconds self.pointCount = pointCount self.isPaused = isPaused self.isAutoPaused = isAutoPaused } } /// Walk start time — fixed for the duration of the activity. public var startedAt: Date public init(startedAt: Date) { self.startedAt = startedAt } }