// // AppEnvironment.swift // Zyquo Router // // Author: Simon-Pierre Boucher // Mail: contact@spboucher.ai // // Composition root for the app's observable stores. Owned by the App and // injected into the view tree as environment objects. // import SwiftUI @MainActor final class AppEnvironment: ObservableObject { let server = ServerController() let catalog = ModelCatalog() let appearance = AppearanceStore() let vault = KeyVaultStore() let localKeys = LocalKeysStore() let routerConfig = RouterConfigStore() } /// Navigator sections (⌘1–6). enum AppSection: String, CaseIterable, Identifiable { case dashboard = "Dashboard" case models = "Models" case requests = "Requests" case keys = "Keys" case playground = "Playground" case docs = "Docs" var id: String { rawValue } var systemImage: String { switch self { case .dashboard: return "gauge.with.dots.needle.50percent" case .models: return "square.grid.2x2" case .requests: return "list.bullet.rectangle" case .keys: return "key" case .playground: return "paperplane" case .docs: return "book" } } }