|
import Foundation
|
|
|
|
@Observable
|
|
final class MainWindowState {
|
|
static let shared = MainWindowState()
|
|
|
|
var selectedBugID: String?
|
|
|
|
var selectedBug: Bug? {
|
|
guard let selectedBugID else { return nil }
|
|
return BugStore.shared.bugs.first { $0.id == selectedBugID }
|
|
}
|
|
|
|
private init() {}
|
|
}
|