-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTodayViewCoordinator.swift
More file actions
31 lines (27 loc) · 887 Bytes
/
Copy pathTodayViewCoordinator.swift
File metadata and controls
31 lines (27 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// TodayViewCoordinator.swift
// DevLogPresentation
//
// Created by opfic on 5/10/26.
//
import Foundation
import DevLogCore
import DevLogDomain
@MainActor
@Observable
final class TodayViewCoordinator {
let viewModel: TodayViewModel
let router = NavigationRouter<TodayRoute>()
init(container: DIContainer) {
self.viewModel = TodayViewModel(
fetchTodosUseCase: container.resolve(FetchTodosUseCase.self),
fetchTodoByIdUseCase: container.resolve(FetchTodoByIdUseCase.self),
upsertTodoUseCase: container.resolve(UpsertTodoUseCase.self),
fetchTodayDisplayOptionsUseCase: container.resolve(FetchTodayDisplayOptionsUseCase.self),
updateTodayDisplayOptionsUseCase: container.resolve(UpdateTodayDisplayOptionsUseCase.self)
)
}
func fetchData() {
viewModel.send(.fetchData)
}
}