// // Copyright 2026 Novaloop AG // // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial. // Please see LICENSE files in the repository root for full details. // import Foundation #if IS_MAIN_APP /// Replaces the stock display-name/avatar editor with the HealthChat profile editor. /// The display name is derived server-side from first and last name, so the stock /// editor would let users create values the next profile update overwrites. struct HealthChatUserDetailsEditScreenHook: UserDetailsEditScreenHookProtocol { @MainActor func makeCoordinator(parameters: UserDetailsEditScreenCoordinatorParameters) -> any UserDetailsEditCoordinatorProtocol { let clientProxy = parameters.userSession.clientProxy let apiService = HealthChatAPIService(tokenProvider: HealthChatOpenIDTokenProvider(clientProxy: clientProxy)) return HealthChatProfileEditScreenCoordinator(parameters: .init(orientationManager: parameters.orientationManager, userSession: parameters.userSession, apiService: apiService, mediaUploadingPreprocessor: parameters.mediaUploadingPreprocessor, navigationStackCoordinator: parameters.navigationStackCoordinator, userIndicatorController: parameters.userIndicatorController)) } } #endif