// // Copyright 2026 Element Creations Ltd. // // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial. // Please see LICENSE files in the repository root for full details. // import Combine import SwiftUI /// Actions an extra tab can ask the session flow to perform on its behalf. enum ExtraHomeTabAction { case presentRoom(roomID: String) case presentCall(roomID: String, isVoiceCall: Bool) } nonisolated protocol HomeTabsHookProtocol: Sendable { /// An extra tab appended after the standard tabs, or nil for none. /// The hook keeps ownership of the tab's flow. @MainActor func makeExtraTab(flowParameters: CommonFlowParameters) -> (tab: NavigationTabCoordinator.Tab, actions: AnyPublisher)? } struct DefaultHomeTabsHook: HomeTabsHookProtocol { func makeExtraTab(flowParameters: CommonFlowParameters) -> (tab: NavigationTabCoordinator.Tab, actions: AnyPublisher)? { nil } }