import Foundation import SharedKit @MainActor final class UserProfileWatchHandler: WatchDataHandling { let key = UserProfile.storageKeyName private let store: WatchProfileStore private let decoder = JSONDecoder() init(store: WatchProfileStore = .shared) { self.store = store } func handle(data: Data) { do { let profile = try decoder.decode(UserProfile.self, from: data) store.setProfile(profile) } catch { store.setStatus("Failed to decode profile") } } }